Scrape deepl using playwright
Project description
deepl-scraper-playwright
Scrape deepl using playwright
Install it
pip install deepl-scraper-pw
# pip install git+https://github.com/ffreemt/deepl-scraper-playwright
# poetry add git+https://github.com/ffreemt/deepl-scraper-playwright
# git clone https://github.com/ffreemt/deepl-scraper-playwright && cd deepl-scraper-playwright
Use it
from pprint import pprint
from deepl_scraper_pw import deepl_tr
pprint(deepl_tr("Test me\n\nTest him"))
# '测试我\n\n测试他'
pprint(deepl_tr("Test me\n\nTest him", from_lang="en", to_lang="de"))
# 'Teste mich\n\nTesten Sie ihn'
Debug
Should something go wrong, you can turn on HEADFUL (a firefox browser will show up). Place .env in the current work directory, with the following content:
PWBROWSER_HEADFUL=1
You can also set DEBUG env variable to turn on detailed debug messages, in Windows:
set DEBUG=1
In Linux and friends
export DEBUG=1
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 deepl_scraper_pw-0.1.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08da3ca2f883fd15f4f9c272c09aca6187f500a001283fe8bcbdbfef203c4ea6 |
|
MD5 | af7a680d3e1f9a2a5ecc188e492e0608 |
|
BLAKE2b-256 | 5d20923f8dfb1e28fda94a9c36a5d6411e76c6fe9505227c274d3b2748db59b8 |