-
Notifications
You must be signed in to change notification settings - Fork 12
Description
我執行
from instagram_scraper.instagram import InstagramScraper
instagram = InstagramScraper()
top_medias_by_location_id = instagram.get_current_top_medias_by_location_id(1)
print(top_medias_by_location_id[0].dict)
print(top_medias_by_location_id[0].get_link())
print(len(top_medias_by_location_id))
報錯
runfile('C:/Users/Desktop/test/untitled0.py', wdir='C:/Users/abc20/Desktop/test')
Traceback (most recent call last):
File "", line 1, in
runfile('C:/Users/Desktop/test/untitled0.py', wdir='C:/Users/abc20/Desktop/test')
File "C:\Users\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "C:\Users\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/Desktop/test/untitled0.py", line 6, in
top_medias_by_location_id = instagram.get_current_top_medias_by_location_id(1)
File "C:\Users\Anaconda3\lib\site-packages\instagram_scraper\instagram.py", line 760, in get_current_top_medias_by_location_id
json_body = json.loads(response.text)
File "C:\Users\Anaconda3\lib\json_init_.py", line 348, in loads
return _default_decoder.decode(s)
File "C:\Users\Anaconda3\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\Anaconda3\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
JSONDecodeError: Expecting value
其他的我用都沒報錯,蠻好用的
期待你修復