MickaelWalter / wp-json-scraper

Scrapes WordPress data using the WP-JSON API activated by default since WordPress 4.7
MIT License
97 stars 26 forks source link

No encoding, then missing module #1

Closed steakscience closed 4 years ago

steakscience commented 5 years ago

Hi there,

Upon running this, I get an error that many files are missing their encoding.

SyntaxError: Non-ASCII character '\xc3' in file WPJsonScraper.py on line 5, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

So I just follow the error and give each file a utf-8 encoding and re-run the program. Then what happens next is that that it's missing a module:

Traceback (most recent call last):
  File "WPJsonScraper.py", line 31, in <module>
    from lib.wpapi import WPApi
  File "/Users/Nirawit/Desktop/wp-json-scraper-0.4/lib/wpapi.py", line 26, in <module>
    from urllib.parse import urlencode
ImportError: No module named parse

How do I go about fixing this? Thank you

MickaelWalter commented 5 years ago

Hi,

What is your environment? It seems like you are using Python 2. Note that Python 2 is not supported and won't be (as the last Python 2 branch is now dying).

MickaelWalter commented 4 years ago

Closed due to inactivity. If someone is encountering the same issue but with Python 3, open a new issue referencing this one.