baidu translate for free with async and proxy support
Project description
freemt-utils
various utils for freemt
Installation
pip install freemt-utils
Validate installation
python -c "import freemt_utils; print(freemt_utils.__version__)"
0.0.1
Usage
from pathlib import Path
import asyncio
from freemt_utils import save_tempfile, switch_to, httpx_get, make_url, arun, fetch_proxies
with switch_to():
print(Path.cwd()) # home dir
print(Path.cwd()) # back to the current work directory
try:
arun(httpx_get('www.baidu.com'))
except Exception as exc:
print(exc) # InvalidURL: No scheme included in URL.
res = arun(httpx_get(make_url('www.baidu.com')))
print(res.headers)
# Headers([('bdpagetype', '1'), ('bdqid',...
res.encoding = 'UTF-8'
save_tempfile(res.text) # display res.text in the default browser
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
freemt-utils-0.0.2.tar.gz
(2.3 kB
view details)
Built Distribution
File details
Details for the file freemt-utils-0.0.2.tar.gz
.
File metadata
- Download URL: freemt-utils-0.0.2.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f653b6e91a84103d7ffdbee68e470c64828324e965db3c37a91114fc798a6e29 |
|
MD5 | a01ace66e77db124be3fa41e87e090ce |
|
BLAKE2b-256 | ee44495b6f6fc3a01f5e139f7559f32306d0f85b9e5a5fef36f020030ffc1e3d |
File details
Details for the file freemt_utils-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: freemt_utils-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16f04f13bd4565f493dd33927b06318df41e9128cccf0240a0f0732221c44566 |
|
MD5 | ab39a1b21f53fa91e7aa27097ca3d73e |
|
BLAKE2b-256 | 5193e582424a233dada662f992cf2fdf236e5e3b99bcca044b0fbe80d3fd659c |