GithubHelp home page GithubHelp logo

mkb-datalab / masterclass-basics-webscraping Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 5.17 MB

This first masterclass introduces some basics on `web scraping`. This technique allows us to retrieve data from websites. This can be especially very handy when there are no datasets available or/and it is not possible to obtain such data via APIs.

License: MIT License

Jupyter Notebook 63.89% HTML 36.11%

masterclass-basics-webscraping's Introduction

Masterclass : Basics on Web Scraping ๐Ÿ”Ž

Photo by Christin Hume on Unsplash

In this first masterclass we introduce some basics on web scraping. This technique allows us to retrieve data from websites. This can be especially very handy when there are no datasets available or/and it is not possible to obtain such data via APIs.

Through hands-on examples it is possible to see how to obtain data from different websites having a basic knowledge on HTML and using some Python, and Python packages.

The notebook Intro & examples webscraping introduces the basics to start webscraping.

Try what you have learn in another set of examples in Masterclass Hands-on-Questions. The answer can be found in Masterclass Hands-on-Complete.

Extra: It is also possible to work on HTML files previously saved using BeautifulSoup. Notebook Hands-On Example 2 for Saved HTML File shows how to save a HTML page with help of requests and work on the HTML using BeatifulSoup.

Visit our repository Basics on Web Scraping if you want to follow a example with even more details.

๐Ÿ”ง Tools

  • requests: HTTP library for Python that allows us to send HTTP requests in a simple way.

  • Beautiful Soup: Python library for pulling data out of HTML and XML files. It allows us to access easily the information we need to retrieve.

Some knowledge on lists, list comprehension, and string methods is also very helpful.

๐Ÿ’ป Install requirements

  • Install requirements using pip install -r requirements.txt.
    • Make sure you use Python 3.
    • You may want to use a virtual environment for this.

โ—€๏ธ Back to repository main page

masterclass-basics-webscraping's People

Contributors

dpbac avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

tmhvaneijk

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.