Skip to main content

A python library to Scrape Wikipedia.

Project description

Wikipedia scraper is a python library to scrape for a Wikipedia. using browser automation. It currently runs only on windows.

Scrape Wikipedia Current events

In this, we first import library.

from wikipedia_scraper_in import *
response = wikipedia.current_events()

Response Data

        "title": "An apartment fire",
        "description": "An apartment fire in the Bronx, New York City, kills 17 people.",
        "link": "/wiki/2022_Bronx_apartment_fire"

Scrape GDP per Capita

In this, we first import library.

from wikipedia_scraper_in import *
response = wikipedia.gdp_per_capita()

Response Data

        "country": "Monaco\u202f*",
        "region": "Europe",
        "imf_estimate": "N/A",
        "Imf_year": "190,532",
        "un_estimate": "2019",
        "un_year": "2019"

Bot Studio

Bot_Studio is needed for browser automation. When this library is imported in code, an automated browser will automatically open up in which it opens Wikipedia page and scrapes data from the page.

Installation

pip install wikipedia-scraper-in

Import

from wikipedia_scraper_in import *

Get Current Events

response = wikipedia.current_events()

Get GDP per Capita

response = wikipedia.gdp_per_capita()

Run bot on cloud

  • Current Events - You can run bot on Cloud.
  • GDP per Capita - You can run bot on Cloud.

Send Feedback to Developers

bot_studio.send_feedback(feedback="Need help with this ......")

Contact Us

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

wikipedia_scraper_in-1.0.1.tar.gz (2.8 kB view hashes)

Uploaded source

Supported by

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