Reddit API
Project description
Installation
pip install reddit-api-client
Examples
Guest Endpoints
from reddit.scraper import Scraper
reddit = Scraper()
homepage = reddit.homepage()
popular = reddit.popular()
front_page = reddit.front_page()
subreddit = reddit.subreddit("pics")
search = reddit.search(
'api blackout',
includePosts=True,
includeCommunities=True,
includeAuthors=True,
includeComments=True,
# communitySearch=False,
# customFeedSearch=False,
# postsAfter=None,
# communitiesAfter=None,
# authorsAfter=None,
# commentsAfter=None,
filters={
'nsfw': '0', # {'1', '0'},
'time_range': 'null', # {'hour', 'day', 'week', 'month', 'year', 'null'},
'post_types': 'null', # {'gif', 'image', 'link', 'poll', 'text', 'video', 'null'},
'result_types': '', # {'subreddit', 'profile', ''}
},
sort='NEW', # {'RELEVANCE', 'HOT', 'TOP', 'NEW', 'COMMENTS'}
)
Auth Endpoints
from reddit.scraper import Scraper
username, password = ..., ...
reddit = Scraper(username, password)
# get data from posts
posts = reddit.posts({
'pics': ['147p5ql', '146zsax'],
'funny': '143wysp',
})
# comment on a post
reddit.comment('146zsax', 'test 123')
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
reddit-api-client-0.0.0.tar.gz
(26.3 kB
view hashes)
Built Distribution
Close
Hashes for reddit_api_client-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87cb4a4d7685d33b0b2638084d34698856db760ef61398bb8398c80c00f3fa29 |
|
MD5 | d3860ee5e146d1e4134b19580c632638 |
|
BLAKE2b-256 | 94c1f665b33e068667d9d673553fe6d9b4897c9e16d0f4ac2549607760019cee |