SeleTrans
Translate phase using selenium. And you can also play the sound of the phase you are querying.
Currently support Baidu, DeepL, Bing and Google.
Usage
from seletrans.api import *
with Google() as ts:
res = ts.query("book", target="zh-CN")
print(res.result)
print(res.dict_result)
res.play_sound()
Check the test case for more information, or run it yourself to see the results.
Explain
Why use selenium? Why not use requests?
Although selenium is slower than requests, it is more convenient to adapt when API changes.
Notice
On the mac, you have to run /Applications/Python 3.10/Install Certificates.command to avoid
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
Metadata
Release files for seletrans 0.4.7
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 | |
|---|---|---|---|---|
| seletrans-0.4.7.tar.gz | 11.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| seletrans-0.4.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.2 kB
Release files / seletrans-0.4.7.tar.gz
| Download URL | seletrans-0.4.7.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52437f3dbd38928ceb8494d737a89c4accfa8b9b3c431664e6f05c9f24f5a662
|
|
BLAKE2b-256 checksum How to use checksums |
e70ae77e81c70ef9981e8378015e52702dcfd0d6d5bb5cfb395501ad878dd763
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.14 CPython/3.10.8 Linux/5.15.78-1-MANJARO
|
Release files / seletrans-0.4.7-py3-none-any.whl
| Download URL | seletrans-0.4.7-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c066a65b3257e8f3d331af26f805e7dd2cabbb05d0e2121ed8ae126f1a847ca1
|
|
BLAKE2b-256 checksum How to use checksums |
4ed745f1dc14ea587842f5087ead6b4b8670c66d631016a5f53fd277a338108e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.14 CPython/3.10.8 Linux/5.15.78-1-MANJARO
|
Security for seletrans 0.4.7
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.