Coder Social home page Coder Social logo

web-scraping's Introduction

620-mod6-web-scraping

Module Objectives

  • Retrieve web page programmatically. (CO3)
  • Parse HTML to search for desired elements. (CO3)
  • Apply NLP to web text. (CO3, CO5)
  • Visualize results from processed web text. (CO6)

See BeautifulSoup Quickstart Guide

Choose a BeautifulSoup parser:

  • 'html.parser' (default, you get this with BeautifulSoup)
  • 'html5lib' (install separately if desired)

Getting Started

Fork (copy into your GitHub account) and clone down (to your machine) this repo to get started with web scraping.

Sometimes the data we need isn't available through an API, but we can still access and view it through a web browser. One possible option for dealing with this kind of situation would be to manually copy the text of the web page, but as data analysts and programmers we can do better. In this module we will use previously seen tools to get the HTML of a web page and introduce the capability to automatically parse and search through the HTML to get the content we want to work with.

Read the following early in the week to help you complete your assignments.

Read the Quick Start Guide for Beautiful SoupLinks to an external site. and make sure you have BeautifulSoup4 installed in your active virtual environment. You do not need to read the entire page of documentation, just the Quick Start Guide and installation instructions (if necessary) Read and listen to the online lecture material on the following topics.

Download and make sure you can read and run the code in Web Scraping Notebook (updated F22).

Be curious. There are common terms and libraries available for processing text.

Reflections

  • What is a token?
  • What is a lemma?
  • What is BeautifulSoup?
  • What is spaCy?
  • What is a spaCy pipeline?
  • What are stop words and how are they used to improve results?
  • What is whitespace?

If any of these are unfamiliar, do a quick search or ask your favorite AI assistant to fill you in. Use your resources to grow your vocabulary and exposure - there's way too much to memorize, but understanding key terms can make us much more productive.

web-scraping's People

Contributors

simsjarrod avatar denisecase 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.