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.0.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for itereddit-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3be2f2b51936c3d65e862bd63f30751c7edcbacc37d2fedefd72e0f1b843821 |
|
MD5 | 6a0a2b39ed490245c6bbd1438abf1c41 |
|
BLAKE2b-256 | 910761e886123d2cbe1517bbc096c78030dcc5f922c220c12ff905592baebab7 |