【发布时间】:2016-07-26 16:50:53
【问题描述】:
我就是无法开始使用 instagram api。
来自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(最近一次调用最后一次):
文件 ...Python35-32\lib\site-packages\simplejson\decoder.py",行 400,在 raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.scanner.JSONDecodeError:期望值:第 1 行第 1 列 (字符 0)
在处理上述异常的过程中,又发生了一个异常:
Traceback(最近一次调用最后一次):
文件 "C:\Users\PolyProgrammist\AppData\Local\Programs\Python\Python35-32\lib\site-packages\instagram\bind.py", 第 131 行,在 _do_api_request raise InstagramClientError('Unable to parse response, not valid JSON.', status_code=response['status']) instagram.bind.InstagramClientError:(404)无法解析响应, 无效的 JSON。
【问题讨论】:
标签: python json instagram-api