scrape google via playwright
Project description
google-scraper-pw
scrape google using playwright, cross platform (Windows/MacOS/Linux)
Installation
pip install google-scraper-pw
# pip install google-scraper-pw -U # upgrade to the latest version
python -m playwright install chromium
or via poetry
poetry add google-scraper-pw &&
python -m playwright install chromium
or
pip install git+https://github.com/ffreemt/google-scraper-playwright.git
python -m playwright install chromium
or clone the repo (git clone https://github.com/ffreemt/google-scraper-playwright.git
) and install from it and
python -m playwright install chromium
Usage
from pprint import pprint
from google_scraper_pw import google_tr
res = google_tr("test me")
print(res)
# '考验我' # took 2.8s
# google_tr preserves format
pprint(google_tr("test you\n\n test me", to_lang="de"))
#'teste dich\n\n teste mich'
text = "Playwright is a Python library to automate Chromium, Firefox and WebKit browsers with a single API. Playwright delivers automation that is ever-green, capable, reliable and fast. "
print(google_tr(text, to_lang="de"))
# Playwright ist eine Python-Bibliothek, um Chrom-, Firefox- und Webkit-Browser mit einer einzigen API zu automatisieren. Der Dramatiker liefert Automatisierung, die jemals grün, fähig, zuverlässig und schnell ist. # took: 2.5s
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
Close
Hashes for google_scraper_pw-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbb7fe22e34dee59aa9cefad59a2615e73f47748985ddc6e491457b73af0a8e4 |
|
MD5 | 586a48522b6f94890701bac501f74b24 |
|
BLAKE2b-256 | 822ba061d2ae06032c38bd192eb9a93076aab58035e5e0b253f70140fe606057 |