2021年5月2日星期日

python requests breaks with Jsondecodeerror :expecting value:char(0)

guys!I am trying to use python to build a crawler,the wen provided me an API,but my breaks with Jsondecodeerror :expecting value:char(0).I wonder if you can provide me some suggestions.Many Thanks!

this is my code:

import urllib.request as urlrequest  import requests  import json  import xlsxwriter    url = "http://wits.worldbank.org/API/V1/SDMX/V21/datasource/TRN/reporter/840/partner/000/product/all/year/2000/datatype/reported"  data = requests.get(url).json()  

Then,it's broken by json.decoder.JSONDecodeerrorError:Expecting Value:line 1 column1 char(0)

https://stackoverflow.com/questions/67362630/python-requests-breaks-with-jsondecodeerror-expecting-valuechar0 May 03, 2021 at 09:46AM

没有评论:

发表评论