Giter VIP home page Giter VIP logo

data-engr's Introduction

Data Engineering

Task 1

The script wiki_extractor.py performs a Wikipedia search using the provided keyword, and returns urls of “n” related Wikipedia pages.

Working :

  1. Related keywords are fetched from the wikipedia search page using BeautifulSoup.
  2. For each keyword returned from the previous step, visit each page and fetch only the first paragraph (again, using BeautifulSoup).
  3. Store the url and paragraph in a dict -> {'url':fetched_url, 'paragraph':'fetched_para'}
  4. Append the dict in a list and finally convert to JSON which will be saved separately with the user-defined file name.

To run the program:
python wiki_extractor.py --keyword=”Indian Historical Events” --num_urls=100 --output=”out.json”

  1. Enter the keyword to be searched
  2. Mention the total number of urls requried
  3. Mention the desired name for resultant JSON file.

data-engr's People

Contributors

geeythree avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.