Skip to main content

scrape google via playwright

Project description

google-scraper-pw

[tests]pythonCode style: blackLicense: MITPyPI version

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


Download files

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

Source Distribution

google-scraper-pw-0.1.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

google_scraper_pw-0.1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file google-scraper-pw-0.1.0.tar.gz.

File metadata

  • Download URL: google-scraper-pw-0.1.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.7.9 Windows/10

File hashes

Hashes for google-scraper-pw-0.1.0.tar.gz
Algorithm Hash digest
SHA256 87bf874f315e6f8944f698ec8fa7d80d8c73786586ebf7eb5b596417273642ca
MD5 340b5c112735f4279e7e4cb57404b4dd
BLAKE2b-256 9110e52acd3ab34c29b413351223490814a33bfd412b73245495761eb66093f5

See more details on using hashes here.

File details

Details for the file google_scraper_pw-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for google_scraper_pw-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbb7fe22e34dee59aa9cefad59a2615e73f47748985ddc6e491457b73af0a8e4
MD5 586a48522b6f94890701bac501f74b24
BLAKE2b-256 822ba061d2ae06032c38bd192eb9a93076aab58035e5e0b253f70140fe606057

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