jchillerup/arto-scrape

must be str, not bytes

Nichlas opened this issue · 1 comments

After setting up virtualenv and installing requirements with pip3 i get this error:

$ python3 profile.py 
:: Dumping A-E-Map to out/5700000/5777177-a-e-map/
 - profile
Traceback (most recent call last):
  File "profile.py", line 54, in <module>
    scrape_profile(5777177)
  File "profile.py", line 40, in scrape_profile
    fp.write(req.content)
TypeError: must be str, not bytes

Please change the line:
fp = open(folder + "profile.html", 'w')
to
fp = open(folder + "profile.html", 'wb')