telepost
Get post from telegram and make ready to repost it to other places (twitter / douban / reddit).
usage
import telepost
import time
import plain_db
import asyncio
existing = plain_db.load('existing')
channel = 'twitter_translate'
post = telepost.getPost(channel, existing, min_time=1, max_time = time.time()) # get the first post outside existing ones
posts = telepost.getPosts(channel, min_time=1, max_time = time.time() - 24 * 10 * 60 * 60) # return a generator
async def run():
# credential file need to contain telegram_api_hash, telegram_api_id and telegram_user_password
post_id = 1392
post_size = 2
filenames = await telepost.getImages(channel, post_id, post_size)
await telepost.exitTelethon()
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
r = loop.run_until_complete(run())
loop.close()
how to install
pip3 install telepost
Metadata
Release files for telepost 0.0.26
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 |
|---|---|---|---|---|
| telepost-0.0.26.tar.gz | 3.5 kB | Without provenance | Details for telepost-0.0.26.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| telepost-0.0.26-py3-none-any.whl | Python 3 | none | any | Details for telepost-0.0.26-py3-none-any.whl |
Total release size: 7.3 kB
Release files / telepost-0.0.26.tar.gz
| Download URL | telepost-0.0.26.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0265b63804a0f795d06c4307251fdf2fe247526058ad68df64dba890b13bceb9
|
|
BLAKE2b-256 checksum How to use checksums |
27266236a306cc3b68644161f5dd7803d59114afa228194f6e9db11d9de97805
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.10
|
Release files / telepost-0.0.26-py3-none-any.whl
| Download URL | telepost-0.0.26-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72aaa135a3f4ea02426734aeec9ffad64a1566630e3e25c0692f562d6e5821ab
|
|
BLAKE2b-256 checksum How to use checksums |
f278683ee43e3c059f7ef111573719208a1115ebbc1365d28fabc95fe4891132
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.10
|
Security for telepost 0.0.26
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.