This release is a pre-release and may not be stable for production use.
deepl-scraper-pp2
scrape deepl using pyppeteer2 with para info, cross platform (Windows/MacOS/Linux)
Intro
deepl-scraper-pp2 is more or less deepl-scraper-pp. deepl-scraper-pp2 however preserves newlines in the translated text. Hence, it will make life easier when trying to process large chunks of text. deepl-scraper-pp2 is originally intended for deepl-tr-webui but can be used elsewhere as well.
Installation
pip install deepl-scraper-pp2
# pip install deepl-scraper-pp2 # upgrade to the latest version
or
poetry add deepl-scraper-pp2
# poetry add deepl-scraper-pp2@latest # upgrade to the latest version
or clone the repo (git clone https://github.com/ffreemt/deepl-scraper-pyppeteer2.git) and install from it.
Usage
in python
import asyncio
from deepl_scraper_pp2.deepl_tr import deepl_tr
print(asyncio.run(deepl_tr("test 1 \n\n test 2"))
# '测试1 \n\n 测试2'
Or start a local server
uvicorn deepl_scraper_pp2.deepl_server:app
# or
python -m deepl_scraper_pp2.run_uvicorn
and consume the REST API
import requests
res = requests.post(
"http://127.0.0.1:8000/text",
json={
"text": "test 1\n\ntest2",
"to_lang": "zh"},
headers={"accept": "application/json", "Content-Type": "application/json"}
)
print(res.json())
# {'q': {'text': 'test 1\n\ntest2', 'from_lang': None, 'to_lang': 'zh', 'description': None},
'result': '测试1\n\n测试2'}
Consult http://127.0.0.1:8000/docs for details.
Disclaimer
The pypi is beta and will likely remain beta -- use it at your own peril.
Metadata
Release files for deepl-scraper-pp2 0.1.0a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deepl-scraper-pp2-0.1.0a2.tar.gz | 10.8 kB | Without provenance | Details for deepl-scraper-pp2-0.1.0a2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deepl_scraper_pp2-0.1.0a2-py3-none-any.whl | Python 3 | none | any | Details for deepl_scraper_pp2-0.1.0a2-py3-none-any.whl |
Total release size: 22.3 kB
Release files / deepl-scraper-pp2-0.1.0a2.tar.gz
| Download URL | deepl-scraper-pp2-0.1.0a2.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
770a3befcc5f39ac4d983d3290c9d4b4bfcc20b9e48436534ff154d7ccea1974
|
|
BLAKE2b-256 checksum How to use checksums |
19914bb6da3d89234a5c149d8995f0b4f65ec3df77d00dc2289d9aea6a635d2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.1 CPython/3.8.10 Windows/10
|
Release files / deepl_scraper_pp2-0.1.0a2-py3-none-any.whl
| Download URL | deepl_scraper_pp2-0.1.0a2-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ab6fead4a86d607c904585ee070db2a20a56ba38e38c8418f99adbc8b584362
|
|
BLAKE2b-256 checksum How to use checksums |
63cefd1e8019379ee495191934fb8a380eaed750dcf8a83c1f808c04efdf9589
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.1 CPython/3.8.10 Windows/10
|
Security for deepl-scraper-pp2 0.1.0a2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.