Skip to main content

searchit

Searchit is a library for async scraping of search engines. The library supports multiple search engines (currently Google, Yandex, Qwant and Bing) with support for other search engines to come.

Install

pip install searchit

Can be installed using pip, by running the above command.

Using Searchit

import asyncio

from searchit import GoogleScraper, YandexScraper, BingScraper
from searchit import ScrapeRequest

request = ScrapeRequest("watch movies online", 30)
google = GoogleScraper(max_results_per_page=10) # max_results = Number of results per page
yandex = YandexScraper(max_results_per_page=10)

loop = asyncio.get_event_loop()

results = loop.run_until_complete(google.scrape(request))
results = loop.run_until_complete(yandex.scrape(request))

To use Searchit users first create a ScrapeRequest object, with term and number of results as required fields. This object can then be passed to multiple different search engines and scraped asynchronously.

Scrape Request - Object

term - Required str - the term to be searched for
count - Required int - the total number of results
domain - Optional[str] - the domain to search i.e. .com or .com
sleep - Optional[int] - time to wait betweeen paginating pages - important to prevent getting blocked
proxy - Optional[str] - proxy to be used to make request - default none
language - Optional[str] - language to conduct search in (only Google atm)
geo - Optional[str] - Geo location to conduct search from Yandex, and Qwant

Roadmap

  • Add additional search engines
  • Tests
  • Blocking non-async scrape method
  • Add support for page rendering (Selenium and Puppeteer)

Release files for searchit 2023.2.5.1

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

Source distribution (sdist)

Source distribution for searchit 2023.2.5.1
File Size Uploaded
searchit-2023.2.5.1.macosx-10.9-x86_64.tar.gz 11.8 kB Details

Release files / searchit-2023.2.5.1.macosx-10.9-x86_64.tar.gz

Download URL searchit-2023.2.5.1.macosx-10.9-x86_64.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e5a84f4f74d8f759040da02352667bd86f0ea00176f04689c0603a4e24c6a09b
BLAKE2b-256 checksum
How to use checksums
80492cdb1b7b0aef146a93dbf0d46a36982e44e29c74159800012ef0650cc429
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.2

Release history Release notifications | RSS feed

This release

2023.2.5.1 This release

1 release file

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