JSONDecodeError: Expecting value: line 1 column 1 (char 0)

 
  
JSONDecodeError Traceback (most recent call last) in () 11 url_visit = 'http://kuaidi100.com/query?type=shentong&postid={}' .format (postid ) 12 crawl_content =urlrequest .urlopen (url_visit ) .read ( ) ---> 13 json_content =json .loads (crawl_content .decode ( "utf8" ) ) 14 i = 0 15 for i in 10 : ~\AppData\Local\conda\conda\envs\course_py35\lib\json\__init__.py in loads (s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) 317 parse_int is None and parse_float is None and 318 parse_constant is None and object_pairs_hook is None and not kw): --> 319 return _default_decoder .decode (s ) 320 if cls is None : 321 cls = JSONDecoder ~\AppData\Local\conda\conda\envs\course_py35\lib\json\decoder.py in decode (self, s, _w) 337 338 """ --> 339 obj , end = self .raw_decode (s , idx =_w (s , 0 ) .end ( ) ) 340 end = _w (s , end ) .end ( ) 341 if end != len (s ) : ~\AppData\Local\conda\conda\envs\course_py35\lib\json\decoder.py in raw_decode (self, s, idx) 355 obj , end = self .scan_once (s , idx ) 356 except StopIteration as err : --> 357 raise JSONDecodeError ( "Expecting value" , s , err .value ) from None 358 return obj , end JSONDecodeError: Expecting value: line 1 column 1 (char 0)
原因 , url_visit='http://www.kuaidi100.com/query?type=shentong&postid={}'.format(postid) 我少些了WWW
先去把网址看一下是否可用再说

你可能感兴趣的:(JSONDecodeError: Expecting value: line 1 column 1 (char 0))