Giter Club home page Giter Club logo

scraping-nyt-bestsellers's Introduction

Scraping Bestselling Books on the NYT Bestselling List

Web scraping, web harvesting, or web data extraction is data scraping used for extracting data from websites.

The New York Times puts out a bestsellers list of books doing well. It can be helpful to get some information from the site to get good books to read.

There were a couple tools I used to complete this project. I used the computer programming language Python for the bulk of the code. Experience with HTML and CSS were particularly useful in grabbing the class names to specify my searches when parsing.

I also used a couple Python packages and libraries. Requests (to send HTTP requests extremely easily), Beautiful Soup (to parse HTML documents), Pandas (to develop easy to read and understand data structures), and OS (which offers functionality to interact with my operating system)

Outline of the Project

  • used requests to download the page
  • used BS4 to parse and extract information
  • converted into a pandas dataframe
  • converted into a CSV file
  1. Scraped https://www.nytimes.com/books/best-sellers/
  2. Compiled a list of categories provided, such as Hardcover Nonfiction, Advice, How To, etc
  3. From each category, the top 15 books were selected, and information including the title, author, publisher, and its time on the list was grabbed
  4. The information was put into a Pandas DataFrame and then transfered into CSV files

All functions created were commented thoroughly for ease of understanding

Resources Used:

scraping-nyt-bestsellers's People

Contributors

anishshriram 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.