JSONデータを取得するにはPython 2.7でAPI呼び出しを行う必要がありますが、まずログインする必要があります。
私は彼らのAPIドキュメントで検索し、これが彼らのAPIのログインです考え出し:
http://site:8080/ContentManager/api/rest/auth/login(ない実際のサイト)
私が最初
にログインする必要があることを意味し、私は今、私にエラーを与えていたコード、{u'code': u'NoUserLogon', u'httpErrorCode': 401, u'description': u'The user is not logon', u'faultFrom': u'Client.Fault'}
コード:
import requests
import json
url = 'http://scala.kimerucore.be:8080/ContentManager/api/rest/playlists/findByName/CameraDetectie'
r = requests.get(url)
print(json.loads(r.content))
問題はまずログインする方法です。 。necessesary
おかげ
使用は '私ははAttributeErrorを得る –