You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I was playing around with this code just now. And I got the same error. This error simply means there is nothing fed into the JSONDecoder. So I checked for possible solutions and find out this API were actually retired on April 10, 2018, according to this page: https://developers.google.com/qpx-express/. So the API was not responding with anything which causes this error. We will probably have to look for an alternative API. I am trying to see if skyscanner API. Not sure if this would work.
I figured out the issue with the
pip install pattern
and I manually updated all the code from python 2 to python 3. Now my headache is:$ python price_check.py 08/30/2018 09/30/2018 BWI ICN DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.expedia.com DEBUG:urllib3.connectionpool:https://www.expedia.com:443 "GET /Flights-Search?trip=roundtrip&leg1=from:BWI,to:ICN,departure:8/29/2018TANYT&leg2=from:ICN,to:BWI,departure:9/29/2018TANYT&passengers=adults:1,children:0,seniors:0,infantinlap:Y&options=cabinclass%3Aeconomy&mode=search&origref=www.expedia.com HTTP/1.1" 200 None DEBUG:root:Cannot find arrival request ID! DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.expedia.com DEBUG:urllib3.connectionpool:https://www.expedia.com:443 "GET /Flight-Search-Paging?c=7da0cad3-45dc-4098-8a03-1d814b696b52&is=1&fl0=&sp=asc&cz=200&cn=0&ul=1 HTTP/1.1" 200 4097 Traceback (most recent call last): File "price_check.py", line 108, in <module> flight_info_list.extend(scraper.get_flight_data_JSON()) File "/Users/admin/find-cheapest-flights/expedia_scraper.py", line 111, in get_flight_data_JSON data_dict = json.loads(e.content) File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s) File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
How do I fix this?
The text was updated successfully, but these errors were encountered: