Skip to main content

Aysncio search engine scraping package

Project description

searchit

Searchit is a library for async scraping of search engines. The library supports multiple search engines (currently Google, Yandex, 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)
yandex_geo - Optional[str] - Yandex location code to conduct search from - default code for London

Roadmap

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

searchit-2019.12.30.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

searchit-2019.12.30.1-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file searchit-2019.12.30.1.tar.gz.

File metadata

  • Download URL: searchit-2019.12.30.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.5

File hashes

Hashes for searchit-2019.12.30.1.tar.gz
Algorithm Hash digest
SHA256 61c0de8b60e80fdc730f74012fe72a64ecbab97efa963d9dce77a589f0a42742
MD5 6e032c055bf1abb8a59739910f89a92d
BLAKE2b-256 0c5e310449bf8fdfa55108bd8c4c89965fa287b17a97e9ccb1a4a66ee32acdad

See more details on using hashes here.

File details

Details for the file searchit-2019.12.30.1-py3-none-any.whl.

File metadata

  • Download URL: searchit-2019.12.30.1-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.5

File hashes

Hashes for searchit-2019.12.30.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e76d15eff0bfe4ff4f2b22706e314e4bca02e3ca6947be5e2c182b408a03163
MD5 8226563be88bd26044278249b08317f8
BLAKE2b-256 77299d780437018d774a5ac43e13682fefd00fa4483b0942631c874e95058b52

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page