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 hashes)
Built Distribution
Close
Hashes for itereddit-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47fe81dbb9445e55e36e34e02d8fc1276fea9c4c2372b34fb92dbb97681fc5aa |
|
MD5 | 4897c31a06a9ce25d4da9a0ffd3e690b |
|
BLAKE2b-256 | a5131e3cb6fdbad56b02decd4f53fbe7364e09c3ab54e599a8aaea69f76c6d30 |