Skip to main content

CrawlerFriend

A light weight Web Crawler that supports Python 2.7 which gives search results in HTML form or in Dictionary form given URLs and Keywords. If you regularly visit a few websites and look for a few keywords (For example, looking for certain team/players in sports website, looking for a bunch of topics on a website...), then this python package (which is a friend of you and a crawler by nature) will automate the task for you and return the result in a HTML file in your web browser.

Installation

pip install CrawlerFriend

Start the Crawler

Import Module

import CrawlerFriend

Start the Crawler

How to start the Crawler? Crawler takes 4 Arguments:

  1. urls (List of URLs)
  2. keywords (List of Keywords)
  3. max_link_limit [Optional] (Maximum no. of link that will be visited, By Default its value is 50)
  4. tags [Optional] (The HTML tags that the Crawler will search for,By Default its value is ['title', 'h1', 'h2', 'h3'])
crawler = CrawlerFriend.Crawler(["https://Website1.com/", "http://Website2.com/"], ["Keyword1", "Keyword2"])
crawler.crawl()

Get Search Results

There are several ways to get the search results(all or for a keyword) in HTML or in Dictionary form

All Result in HTML

crawler.get_result_in_html()

All Result in Dictionary

result_dict = crawler.get_result()

Result of a Keyword in HTML

crawler.get_result_of_keyword_in_html()

Result of a Keyword in Dictionary

result_dict = crawler.get_result_of_keyword('keyword1')

CrawlerFriend uses 50 as max_link_limit by default for searching. But users can use their own max_link_limit as well like this:

crawler = CrawlerFriend.Crawler(["https://Website1.com/", "http://Website2.com/"], ["Keyword1", "Keyword2"], max_link_limit=200)
crawler.crawl()

Specify tags

CrawlerFriend uses four HTML tags 'title', 'h1', 'h2', 'h3' by default for searching. But users can use their own tags as well like this:

crawler = CrawlerFriend.Crawler(["https://Website1.com/", "http://Website2.com/"], ["Keyword1","Keyword2"], tags=['p','h4'])
crawler.crawl()

Metadata

Release files for CrawlerFriend 1.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CrawlerFriend 1.0.8
File Size Uploaded Provenance Actions
CrawlerFriend-1.0.8.tar.gz 4.4 kB Without provenance Details for CrawlerFriend-1.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for CrawlerFriend 1.0.8
File Interpreter ABI Platform Actions
CrawlerFriend-1.0.8-py2-none-any.whl Python 2 none any Details for CrawlerFriend-1.0.8-py2-none-any.whl

Total release size: 9.2 kB

Release files / CrawlerFriend-1.0.8.tar.gz

Download URL CrawlerFriend-1.0.8.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2f51efee0a5743f65a148bf6610a549d75c595ff5555ebd8e67e40831f9a80d1
BLAKE2b-256 checksum
How to use checksums
9595890b97e5866e3505ecccd938c9be4dcbbdc937fef7f307bd1582b046cdf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/18.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.4.3

Release files / CrawlerFriend-1.0.8-py2-none-any.whl

Download URL CrawlerFriend-1.0.8-py2-none-any.whl
Size 4.8 kB
Tags Python 2
SHA-256 checksum
How to use checksums
8e5fbe7678fe0b79c4491f78af533535b9e8ccb9097321f3c34a59b1ceb4179d
BLAKE2b-256 checksum
How to use checksums
00425318d23ccf517312c3ed6d7e44fa285e18235e1f383ca1e337bdd4ee9109
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/18.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.4.3

Security for CrawlerFriend 1.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page