Compilation of news for a given subject, using Google News.
A project made with the purpose of studying automation, scraping and file manipulation with Python.
- First, clone this repo with:
git clone https://github.com/cauabernardino/newscompiler
- Enter the directory and install the package:
$ cd newscompiler $ pip install .
- Usage:
# With default values to language (english) and time interval (1d) $ news "star wars" $ news -l en -t 1d "star wars" # With different values $ news -l pt -t 7d "star wars" # To export to PDF $ news -l pt -t 1d "star wars" --pdf
- Use
news -h
ornews --help
for all options
- Use
- The output can be either in console or as a PDF file, with news headlines and their links in TinyURL format.
- Update on package configuration logic
- New generator logic for console printing
- News printing to the console implemented (now standard)
- Refactor of PDF exporting function
- New argument to export to PDF
- Refactor of code to detach functionalities
- Python package configuration
- Time interval choosing
- Total refactor for performance and generalization improvements!
- Now the script uses
requests
andlxml.html
for scraping; - No more need for Selenium and Chromedriver.
- Now the script uses
- Testing with Chrome v86+, after updating Chromedriver, and working.
- Added new command-line option for choosing the language of the search;
- Browser window will run minimized.
- First version release.