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

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.9
File Size Uploaded Provenance Actions
CrawlerFriend-1.0.9.tar.gz 4.9 kB Without provenance Details for CrawlerFriend-1.0.9.tar.gz

Built distribution (wheel)

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

Total release size: 10.2 kB

Release files / CrawlerFriend-1.0.9.tar.gz

Download URL CrawlerFriend-1.0.9.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
93e41f2c63c0f7aae2002d3306ee630fc267cc4e9e9411f028452d5d250317f2
BLAKE2b-256 checksum
How to use checksums
9a6632ee9967f19bc9fc17baf103ad8e5f32ea70618824f8b0e4018d1158dd57
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.9-py2-none-any.whl

Download URL CrawlerFriend-1.0.9-py2-none-any.whl
Size 5.2 kB
Tags Python 2
SHA-256 checksum
How to use checksums
e2b3bebcc9c12d02d13034577d02a20abab5fabf4ccacd711f6c7aa307bb6fd9
BLAKE2b-256 checksum
How to use checksums
3009c5f48a8ac349e9c139f923914eb47d8c08404c185a2c031b160637fa05d4
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.9

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