Iterate posts from subreddit asynchronously
Project description
Itereddit
Iterate posts from subreddit. Posts are represented by dataclasses without unnecessary fields. So far, not all types of posts are covered, so I may need help adding new ones: you can just report the post and link in new issue
How to use it, Wapfelka?
Parsing media in the best resolution, for example:
import asyncio
from itereddit import Itereddit
itereddit = Itereddit()
async def main():
async for i in itereddit:
if i.media:
if i.media.media_metadata:
for m in i.media.media_metadata:
print(i.media.media_metadata[m].original.url)
elif i.media.resolutions:
print(i.media.resolutions[-1].url)
asyncio.run(main())
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
itereddit-1.0.1.tar.gz
(7.9 kB
view details)
Built Distribution
File details
Details for the file itereddit-1.0.1.tar.gz
.
File metadata
- Download URL: itereddit-1.0.1.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 547df4ae22f35decc3e36d4fbbb7f5ae112610e04132157c1bcdd5b67b25e0e5 |
|
MD5 | bb7117f3a7608adf1b56b8924d66d601 |
|
BLAKE2b-256 | 13773e2d805b6749f200bf630855454b9daf0078c8a0d8cb860da3347a6d125a |
File details
Details for the file itereddit-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: itereddit-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47fe81dbb9445e55e36e34e02d8fc1276fea9c4c2372b34fb92dbb97681fc5aa |
|
MD5 | 4897c31a06a9ce25d4da9a0ffd3e690b |
|
BLAKE2b-256 | a5131e3cb6fdbad56b02decd4f53fbe7364e09c3ab54e599a8aaea69f76c6d30 |