GithubHelp home page GithubHelp logo

alexkelin / webscraper Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 17 KB

This is a simple Python program that allows the user to search for video card models on the Newegg website and retrieve the prices and links for the products and store the results to an SQL database.

Python 100.00%
database sql webscapping

webscraper's Introduction

Webscraper Video Card Search Tool

This is a simple Python program that allows the user to search for video card models on the Newegg website and retrieve the prices and links for the products and store the results to an SQL database.

Requirements

Python 3.x requests library BeautifulSoup library sqlite3 library

Usage

Run the program by executing python video_card_search.py in the terminal. Input the video card model you want to search for. The program will scrape the Newegg website and retrieve the prices and links for the products. The program will store the data in an SQLite database.

Program Explanation

The get_model function asks the user for the video card model they want to search for. The get_clean_page function retrieves the number of pages and the HTML document from the Newegg website using the user's search term. The parse_page function loops through each page of the search results, extracts the product names, links, and prices, and stores the data in a dictionary. The store_data function creates an SQLite database and stores the data retrieved from the Newegg website. The main function combines the above functions to provide a complete search experience for the user.

Future Improvements

Add error handling for invalid input or unexpected website response. Add the ability to sort by price, rating, and other factors. Improve database management, such as allowing users to export or import data. Add support for additional websites or product categories.

webscraper's People

Contributors

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