Skip to main content

News scraper package

Project description

Scraper Package

This news scraper package provides three functions:

  1. NewsAPI_Pckg.py Takes the following parameters:
  • API key
  • source domain (eg: Reuters.com)
  • range of dates (from and to) as an array

Range of dates must be in this format: #example dates = [ "11/10/20 - 12/10/20", "05/04/20 - "05/04/20" ]

Produces: Results of "everthing" search for one particular news source through NewsAPI and outputs results into a json object

  1. reuters.py
  • Requires selinium driver installation: https://chromedriver.chromium.org/downloads
  • Navigates to Reuters world news site
  • Collects all headlines, summaries, and article URLs from each article starting with the most recent stories, for specified number of pages
  • Reuters World website lists 10 articles per page, in reverse chronological order typically going back about a year from the current date
  • Scrolls through X number of pages to repeat the process for older news (1 page = 10 articles) -> Enter this as a parameter in your usage script
  • see https://www.reuters.com/news/world for page format
  • Saves data to a JSON object
  1. nyt.py
  • enter a specific article's URL from the New York Times as a parameter
  • output is a dictionary with the summary and full text article associated with the URL

see example_usage.py for sample code using this package

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Scraper_Package_DSC-0.0.1.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Scraper_Package_DSC-0.0.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file Scraper_Package_DSC-0.0.1.tar.gz.

File metadata

  • Download URL: Scraper_Package_DSC-0.0.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for Scraper_Package_DSC-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ce8bc144a424e6151c9660448d85c57be88649e2be651db7a7fae4dd1dae3d2a
MD5 03576d4cae20ea50b461406b98c9e71e
BLAKE2b-256 80b32e678d0e2a9156134b92a2fa73d653569996bee2950466f268f92cfa30a8

See more details on using hashes here.

File details

Details for the file Scraper_Package_DSC-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: Scraper_Package_DSC-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for Scraper_Package_DSC-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 08a0b940eb2ff5d11e68199d99b17529b12f9e03cf42d75df058d7646a82d5c3
MD5 25c2d182798fdfd7369ed74c6c330525
BLAKE2b-256 6f8f505a73f40a99b69e8285a3682d44de1fb1182ac8a4e53ad25e6b5b71b418

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page