When trying to run the scraper, the following error appears:
$ python scraper.py
http://hackerspaces.org/w/api.php?action=ask&query=[[country::Switzerland]]
[[Category:Hackerspace]]&format=json&offset=0
Traceback (most recent call last):
File "scraper.py", line 163, in <module>
hs = hackerspaces.get_hackerspaces()
File "scraper.py", line 84, in get_hackerspaces
hackerspaces_page = Hackerspaces.get_json(Hackerspaces.country_list(self.country, offset=offset))
File "scraper.py", line 63, in get_json
return resp.json()
File "/Library/Python/2.7/site-packages/requests-2.7.0-py2.7.egg/requests/models.py", line 819, in json
return json.loads(self.text, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
It seems that hackerspaces.org automatically redirects to https. When I tried changing the URL to https, the parser claimed that there was an issue with tag mismatches:
XMLSyntaxError: Opening and ending tag mismatch: hr line 5 and body, line 6, column
According to a question on stackexchange, this appears to be an issue with hs.org's JSON formatting.
When trying to run the scraper, the following error appears:
It seems that hackerspaces.org automatically redirects to https. When I tried changing the URL to https, the parser claimed that there was an issue with tag mismatches:
According to a question on stackexchange, this appears to be an issue with hs.org's JSON formatting.