An SDK for artificial-human interaction with websites, namely Google search and CAPTCHAs.
Project description
Installation
pip install git+https://github.com/ArtificialHumanoid/Humanoid#subdirectory=build
.
Issues, Pull Requests, and Commits
Issues and, of course, pull requests, are tracked via GitHub.
Accordingly, all commit messages should be prefixed with “#” (followed by an issue or pull request numbered reference).
googlesearch
googlesearch is a Python library for searching Google, easily. googlesearch uses requests and BeautifulSoup4 to scrape Google.
Usage
To get results for a search term, simply use the search function in googlesearch. For example, to get results for "Google" in Google, just run the following program:
googlesearch.search("Google")
Additional options
By default, googlesearch
returns 10 results.
To get a 100 results on Google, for example:
googlesearch.search("Google", num_results=100)
In addition, you can change the language Google searches in. For example, to get results in French run the following program:
googlesearch.search("Google", lang="fr")
To extract more information, such as the description or the result URL, use an advanced search:
googlesearch.search("Google", advanced=True)
which returns List[SearchResult]
with each result having the properties
- title
- url
- description.
If requesting more than 100 results, googlesearch will send multiple requests to go through the pages. To increase the time between these requests, use sleep_interval:
googlesearch.search("Google", sleep_interval=5, num_results=200)
captcha_solver
Univeral API to work with captcha solving services.
Twocaptcha Backend Example
Service website is https://2captcha.com
from captcha_solver import CaptchaSolver
solver = CaptchaSolver('twocaptcha', api_key='2captcha.com API HERE')
raw_data = open('captcha.png', 'rb').read()
print(solver.solve_captcha(raw_data))
Rucaptcha Backend Example
Service website is https://rucaptcha.com
from captcha_solver import CaptchaSolver
solver = CaptchaSolver('rucaptcha', api_key='RUCAPTCHA_KEY')
raw_data = open('captcha.png', 'rb').read()
print(solver.solve_captcha(raw_data))
Browser Backend Example
from captcha_solver import CaptchaSolver
solver = CaptchaSolver('browser')
raw_data = open('captcha.png', 'rb').read()
print(solver.solve_captcha(raw_data))
Antigate Backend Example
Service website is http://getcaptchasolution.com
from captcha_solver import CaptchaSolver
solver = CaptchaSolver('antigate', api_key='ANTIGATE_KEY')
raw_data = open('captcha.png', 'rb').read()
print(solver.solve_captcha(raw_data))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Humanoid-0.0.1.tar.gz
.
File metadata
- Download URL: Humanoid-0.0.1.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 795bfd739730d06c0644d30b36c76a8e9a81342f63a7c1ddda3fb5bd2f8b82fe |
|
MD5 | c91a44e5850b76d7cc707680e0e891bf |
|
BLAKE2b-256 | b9d4d86feb02c387540d47d84154edd12e288150e4184b63b85c40b10d807082 |
File details
Details for the file Humanoid-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: Humanoid-0.0.1-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d72544888ee2fa79e6dee65e36a20a65909b4acc33dd063da1e96f0a0adf8afe |
|
MD5 | 7a44b1928bca0d43be6f89c80c43bc95 |
|
BLAKE2b-256 | e27f53fea2223fdbcd5aff73e877b8175c82b99fae54dbe1ab81a9cfb3f911ff |