Skip to main content

SERP Bot

This is a utility that has gives the basic use of scraping web engines. This is simple in the way it works, however, just using some common sense would allow you to make some rather advanced uses of this.

Caution : SERP bots are a legal gray zone.

This can be installed through pip.

pip install serp-bot

Alternatively, you could download this repository and install it with pip.

pip3 install .

Using

This has 3 components that can be made use of. SERPBot, GenericSearchEngine and RequestDispatcher.

Sample usage 1(Directly using the SERPBot object only):

from serp_bot import SERPBot, SearchEngines

bot = SERPBot(engine = SearchEngines.DUCKDUCKGO)
# or,
# bot = SERPBot(engine = SERPBot.get_random_engine())
# or, can be left blank the default engine is Yahoo

print(bot.run("hello world"))

Sample usage :

from serp_bot import SERPBot, RequestDispatcher

bot = SERPBot()
dispatcher = RequestDispatcher()
engine = bot.get_random_search_engine()
print(engine)
engine.build_base_query('hello world')
print(engine.get_current_url())
dispatcher.get(engine.get_current_url()[0])
print(dispatcher.last_response.text)
with open('sample.html', 'w+') as html_file:
	html_file.write(dispatcher.last_response.text)

Alternatively, using the RequestDispatcher can help avoid some Web Scraping detection units.

from serp_bot import RequestDispatcher

request_dispatcher = RequestDispatcher()
response = request_dispatcher.get('https://google.com/search?q=crapper+zapper')
print(response.content)

Metadata

Release files for serp-bot 0.3.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 serp-bot 0.3.1
File Size Uploaded
serp_bot-0.3.1.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for serp-bot 0.3.1
File Interpreter ABI Platform
serp_bot-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 19.9 kB

Release files / serp_bot-0.3.1.tar.gz

Download URL serp_bot-0.3.1.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ace62822ce516645059b2b9be6d02fe041fcefa5302ab871fb161732bd56db81
BLAKE2b-256 checksum
How to use checksums
ab7ae286b77e0845da3ce9efc36d8702e3341c30df662b7ca6cdcc84c19d82e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / serp_bot-0.3.1-py3-none-any.whl

Download URL serp_bot-0.3.1-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c2cb3573094070eef103a261b33841b4273893ef7d638aab5fd05b9f934ee4a
BLAKE2b-256 checksum
How to use checksums
e5416c999b590156739b9f05c9c464cabea87526626797390dcefc10decb869f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.1.0

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

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