Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Command line website scraper

Project Description

webgrep is a simple tool for scraping websites from the command line

Setup: > sudo easy_install webgrep

Example: Finding number of ratings for a book on goodreads

Find the location of the ‘Ratings’ in the html by using the -g option: > -g ‘Ratings’ -u “” match,location “267,896 Ratings”,” 1,3,1,3,5,3,7,1,3,5,14,1,0”

Now use that location value (” 1,3,1,3,5,3,7,1,3,5,14,1,0”) as the -l argument to look in the same location on a different page > -l ” 1,3,1,3,5,3,7,1,3,5,14,1,0” -u “” “778,683 Ratings”

Example: Using “-” in a location value as a wildcard. Want to find all imdb titles on a page

> -g Shawshank -u “,&release_date=1990,&sort=user_rating,desc&title_type=feature” match,location The Shawshank Redemption,” 1,3,3,1,14,12,3,5,3,5,3,0”

> -g “The Dark Knight” -u “,&release_date=1990,&sort=user_rating,desc&title_type=feature” match,location The Dark Knight,” 1,3,3,1,14,12,3,5,5,5,3,0” The Dark Knight Rises,” 1,3,3,1,14,12,3,5,69,5,3,0”

> -l ” 1,3,3,1,14,12,3,5,-,5,3,0” -u “,&release_date=1990,&sort=user_rating,desc&title_type=feature” The Shawshank Redemption The Dark Knight Schindler’s List Pulp Fiction The Lord of the Rings: The Return of the King …

Common errors: Quote the -u argument in bash or else ‘&’ may be read as running the process in the background instead of part of the url

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(7.6 kB) Copy SHA256 Hash SHA256
Source None Apr 22, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers