A collection of tools to aid in web scraping.
Project description
scrapetools
A collection of tools to aid in web scraping.
Install using:
pip install scrapetools
scrapetools contains three functions (scrape_emails, scrape_phone_numbers, scrape_inputs)
and one class (LinkScraper).
Basic usage:
import scrapetools import requests url = 'https://somewebsite.com' source = requests.get(url).text emails = scrapetools.scrape_emails(source) phoneNumbers = scrapetools.scrape_phone_numbers(source) scraper = scrapetools.LinkScraper(source, url) scraper.scrape_page() # links can be accessed and filtered via the get_links() function same_site_links = scraper.get_links(same_site_only=True) same_site_image_links = scraper.get_links(link_type='img', same_site_only=True) external_image_links = scraper.get_links(link_type='img', excluded_links=same_site_image_links) # scrape_inputs() returns a tuple of BeautifulSoup Tag elements for various user input elements forms, inputs, buttons, selects, text_areas = scrapetools.scrape_inputs(source)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
scrapetools-1.0.0.tar.gz
(17.5 kB
view hashes)
Built Distribution
Close
Hashes for scrapetools-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bddf5648534753b9f7bc5bfcd93fdaadf962aad77bb6fed04e09c095b4ff3187 |
|
MD5 | 8d7d74e5f15791f93908fa42b8bae28b |
|
BLAKE2b-256 | dd2152e1562731d160b871b7b4387864775a14eea510a521d22622d90e9ea5c9 |