Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23189

pygooglenews and feedparser error during pip

$
0
0

pip install pygooglenews --upgrade

Collecting pygooglenews  Obtaining dependency information for pygooglenews from https://files.pythonhosted.org/packages/59/cb/84f162888a07e501630f6be7c70997c5c8afd5ba4a40c3a079c321e97c29/pygooglenews-0.1.2-py3-none-any.whl.metadata  Using cached pygooglenews-0.1.2-py3-none-any.whl.metadata (19 kB)Requirement already satisfied: beautifulsoup4<5.0.0,>=4.9.1 in c:\users\valer\anaconda3\lib\site-packages (from pygooglenews) (4.12.2)Collecting dateparser<0.8.0,>=0.7.6 (from pygooglenews)  Obtaining dependency information for dateparser<0.8.0,>=0.7.6 from https://files.pythonhosted.org/packages/c1/d5/5a2e51bc0058f66b54669735f739d27afc3eb453ab00520623c7ab168e22/dateparser-0.7.6-py2.py3-none-any.whl.metadata  Using cached dateparser-0.7.6-py2.py3-none-any.whl.metadata (26 kB)Collecting feedparser<6.0.0,>=5.2.1 (from pygooglenews)  Using cached feedparser-5.2.1.zip (1.2 MB)  Preparing metadata (setup.py): started  Preparing metadata (setup.py): finished with status 'error'Note: you may need to restart the kernel to use updated packages.  error: subprocess-exited-with-error  python setup.py egg_info did not run successfully.  exit code: 1

[1 lines of output]error in feedparser setup command: use_2to3 is invalid.[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.error: metadata-generation-failed

Encountered error while generating package metadata.

See above for output.

note: This is an issue with the package mentioned above, not pip.hint: See above for details.​

I'm trying to run this learning project:

from pygooglenews import GoogleNews from collections  import Countergn = GoogleNews(lang='pt' , country="BR")initial_year = 2020until_year =  2024search_word = 'Goku'counts = Counter()for year in range(initial_year, until_year + 1):    for month in range(1,13):        if year == until_year and month > 3:            break    search = gn.search(f'{search_word} after:{year}-{month:02d}-01 before:{year}-{month:02d}-28')    counts[year] += sum(search_word in entry['title'] for entry in search['entries'])

Viewing all articles
Browse latest Browse all 23189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>