reddit-api-client


Namereddit-api-client JSON
Version 0.0.0 PyPI version JSON
download
home_pagehttps://github.com/trevorhobenshield/reddit-api-client
SummaryReddit API
upload_time2023-06-13 00:30:52
maintainer
docs_urlNone
authorTrevor Hobenshield
requires_python>=3.10.10
license
keywords reddit api client async search automation bot scrape
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            

### Installation
```
pip install reddit-api-client
```

### Examples

#### Guest Endpoints
```python
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
```python
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')
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/trevorhobenshield/reddit-api-client",
    "name": "reddit-api-client",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10.10",
    "maintainer_email": "",
    "keywords": "reddit api client async search automation bot scrape",
    "author": "Trevor Hobenshield",
    "author_email": "trevorhobenshield@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4f/47/3b27586ee73739b7a27247f54772cc759427dc5fac1481083ff0cda97068/reddit-api-client-0.0.0.tar.gz",
    "platform": null,
    "description": "\n\n### Installation\n```\npip install reddit-api-client\n```\n\n### Examples\n\n#### Guest Endpoints\n```python\nfrom reddit.scraper import Scraper\n\nreddit = Scraper()\n\nhomepage = reddit.homepage()\n\npopular = reddit.popular()\n\nfront_page = reddit.front_page()\n\nsubreddit = reddit.subreddit(\"pics\")\n\nsearch = reddit.search(\n    'api blackout',\n    includePosts=True,\n    includeCommunities=True,\n    includeAuthors=True,\n    includeComments=True,\n    # communitySearch=False,\n    # customFeedSearch=False,\n    # postsAfter=None,\n    # communitiesAfter=None,\n    # authorsAfter=None,\n    # commentsAfter=None,\n    filters={\n        'nsfw': '0',  # {'1', '0'},\n        'time_range': 'null',  # {'hour', 'day', 'week', 'month', 'year', 'null'},\n        'post_types': 'null',  # {'gif', 'image', 'link', 'poll', 'text', 'video', 'null'},\n        'result_types': '',  # {'subreddit', 'profile', ''}\n    },\n    sort='NEW',  # {'RELEVANCE', 'HOT', 'TOP', 'NEW', 'COMMENTS'}\n)\n```\n\n#### Auth Endpoints\n```python\nfrom reddit.scraper import Scraper\n\nusername, password = ..., ...\nreddit = Scraper(username, password)\n\n# get data from posts\nposts = reddit.posts({\n    'pics': ['147p5ql', '146zsax'],\n    'funny': '143wysp',\n})\n\n# comment on a post\nreddit.comment('146zsax', 'test 123')\n```\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Reddit API",
    "version": "0.0.0",
    "project_urls": {
        "Homepage": "https://github.com/trevorhobenshield/reddit-api-client"
    },
    "split_keywords": [
        "reddit",
        "api",
        "client",
        "async",
        "search",
        "automation",
        "bot",
        "scrape"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "94c1f665b33e068667d9d673553fe6d9b4897c9e16d0f4ac2549607760019cee",
                "md5": "d3860ee5e146d1e4134b19580c632638",
                "sha256": "87cb4a4d7685d33b0b2638084d34698856db760ef61398bb8398c80c00f3fa29"
            },
            "downloads": -1,
            "filename": "reddit_api_client-0.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d3860ee5e146d1e4134b19580c632638",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10.10",
            "size": 25999,
            "upload_time": "2023-06-13T00:30:50",
            "upload_time_iso_8601": "2023-06-13T00:30:50.930029Z",
            "url": "https://files.pythonhosted.org/packages/94/c1/f665b33e068667d9d673553fe6d9b4897c9e16d0f4ac2549607760019cee/reddit_api_client-0.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f473b27586ee73739b7a27247f54772cc759427dc5fac1481083ff0cda97068",
                "md5": "243e59e3ffa96f5f91ad9744203c72c3",
                "sha256": "b027ac0b0b6369b704aeeb1f470d4db0cc68eb291f01dc6d853d9f2fc38bbcae"
            },
            "downloads": -1,
            "filename": "reddit-api-client-0.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "243e59e3ffa96f5f91ad9744203c72c3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10.10",
            "size": 26297,
            "upload_time": "2023-06-13T00:30:52",
            "upload_time_iso_8601": "2023-06-13T00:30:52.287795Z",
            "url": "https://files.pythonhosted.org/packages/4f/47/3b27586ee73739b7a27247f54772cc759427dc5fac1481083ff0cda97068/reddit-api-client-0.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-13 00:30:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "trevorhobenshield",
    "github_project": "reddit-api-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "reddit-api-client"
}
        
Elapsed time: 1.07439s