Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Simple webscraper built on top of requests and beautifulsoup

Project description

Some basic webscraper I use in many projects.


Module to ease web efforts


  • Cached web requests (Wrapper around requests)
  • Bultin parsing/scraping (Wrapper around beautifulsoup)

Constructor parameters

  • url: Default url, used if nothing else specified
  • scheme: Default scheme for scrapping
  • timeout
  • cache_directory: Where to save cache files
  • cache_time: How long is a cached resource vaild - in seconds (default: 7 minutes)
  • cache_use_advanced
  • auth_method: Authentication method (default: HTTPBasicAuth)
  • auth_username: Authentication username. If set, enables authentication
  • auth_password: Authentication password
  • handle_redirect: Allow redirects (default: True)
  • user_agent: User agent to use
  • default_user_agents_browser: Browser to set in user agent (from default_user_agents dict)
  • default_user_agents_os: Operating system to set in user agent (from default_user_agents dict)
  • user_agents_browser: Browser to set in user agent (Overwrites default_user_agents_browser)
  • user_agents_os: Operating system to set in user agent (Overwrites default_user_agents_os)
  • html2text: HTML2text settings
  • html_parser: What html parser to use (default: html.parser - built in)


# Setup WebScraper with caching
web = WebScraper({
    'cache_directory': "cache",
    'cache_time': 5*60

# First call to git -> hit internet

# Second call to git (within 5 minutes of first) -> hit cache

Whitch results in the following output:

2016-01-07 19:22:00 DEBUG   [WebScraper._getCached] From inet
2016-01-07 19:22:00 INFO    [requests.packages.urllib3.connectionpool] Starting new HTTPS connection (1):
2016-01-07 19:22:01 DEBUG   [requests.packages.urllib3.connectionpool] "GET / HTTP/1.1" 200 None
2016-01-07 19:22:01 DEBUG   [WebScraper._getCached] From cache


0.2.2 (2017-12-07)

  • Fix cache duration bug

0.2.1 (2017-11-03)

  • Add raw response to unchached response

0.2.0 (2017-10-12)

  • Rework api names
  • Redesign caching

0.1.15a0 (2016-03-08)

  • First release on PyPI.

Project details

Release history Release notifications

This version
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
floscraper-0.2.2-py2.7.egg (26.6 kB) Copy SHA256 hash SHA256 Egg 2.7 Dec 7, 2017
floscraper-0.2.2-py2.py3-none-any.whl (14.5 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Dec 7, 2017
floscraper-0.2.2.tar.gz (11.9 kB) Copy SHA256 hash SHA256 Source None Dec 7, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page