我只是不能開始使用instagram api。無效JSON python-instagram
從GitHub代碼https://github.com/facebookarchive/python-instagram
from instagram.client import InstagramAPI
access_token = "***"
client_secret = "***"
scope = 'public_content'
api = InstagramAPI(access_token=access_token, client_secret=client_secret)
recent_media, next_ = api.user_recent_media(user_id = "***", count=10)
for media in recent_media:
print("hey")
錯誤:
Traceback (most recent call last):
File ...Python35-32\lib\site-packages\simplejson\decoder.py", line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
在處理上述異常,另一個異常:
Traceback (most recent call last):
File "C:\Users\PolyProgrammist\AppData\Local\Programs\Python\Python35-32\lib\site-packages\instagram\bind.py", line 131, in _do_api_request raise InstagramClientError('Unable to parse response, not valid JSON.', status_code=response['status']) instagram.bind.InstagramClientError: (404) Unable to parse response, not valid JSON.
那我該怎麼辦?我想只使用inst api(獲取訂閱列表或像一些帖子)我該怎麼做 – PolyProgrammist