Skip to content

JSON Error #1

@dc500

Description

@dc500

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions