kotartemiy / pygooglenews

If Google News had a Python library
https://newscatcherapi.com
MIT License
1.26k stars 134 forks source link

Upgrade feedparser #18

Open 8W9aG opened 3 years ago

8W9aG commented 3 years ago
decorouz commented 3 years ago
  • Currently the feedparser specified in the requirements does not work with Python 3.9.x due to this issue: kurtmckee/feedparser#206

  • Upgrade the feedparser so pygooglenews works with python 3.9.x

  • Currently the feedparser specified in the requirements does not work with Python 3.9.x due to this issue: kurtmckee/feedparser#206

  • Upgrade the feedparser so pygooglenews works with python 3.9.x

Line 93 in feedparser.py change _base64decode = getattr(base64, 'decodebytes', base64.decodestring) to base64.decodebytes. This is based on the fix by @kurtmckee

8W9aG commented 2 years ago

Thanks for the approval, cannot merge myself due to permissions

Pyth3rEx commented 2 years ago

I know just trying to spam the notifications enough to get the owner to notice :P

NicolasCaousGV commented 2 years ago

To anyone who wants to use this lib but can't install, you can force the dependencies to be a specific version this way:

python -m pip install "beautifulsoup4==4.9.1"
python -m pip install "dateparser==0.7.6"
python -m pip install "requests==2.24.0"
python -m pip install "feedparser==6.0.8"
python -m pip install --no-deps pygooglenews

This should work. (If it doesn't, check if the versions have changed in pyproject.toml for some reason)