{"id":21493936,"url":"https://github.com/nukdokplex/rule34-posts-wrapper","last_synced_at":"2025-07-15T19:31:12.798Z","repository":{"id":61415522,"uuid":"550802412","full_name":"nukdokplex/rule34-posts-wrapper","owner":"nukdokplex","description":"Library for retrieving posts and tags from rule34.paheal.net","archived":false,"fork":false,"pushed_at":"2023-05-15T04:10:43.000Z","size":205,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-08T03:48:01.314Z","etag":null,"topics":["api-wrapper","nsfw","paheal","python","r34","rule34","rule34api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nukdokplex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-13T10:56:06.000Z","updated_at":"2024-07-06T16:51:55.000Z","dependencies_parsed_at":"2023-01-31T00:45:39.435Z","dependency_job_id":null,"html_url":"https://github.com/nukdokplex/rule34-posts-wrapper","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nukdokplex%2Frule34-posts-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nukdokplex%2Frule34-posts-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nukdokplex%2Frule34-posts-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nukdokplex%2Frule34-posts-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nukdokplex","download_url":"https://codeload.github.com/nukdokplex/rule34-posts-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226064538,"owners_count":17568034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-wrapper","nsfw","paheal","python","r34","rule34","rule34api"],"created_at":"2024-11-23T15:48:26.269Z","updated_at":"2024-11-23T15:48:26.729Z","avatar_url":"https://github.com/nukdokplex.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rule34 posts wrapper\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/nukdokplex/rule34-posts-wrapper/.github/workflows/ci.yml?label=CI\u0026logo=github\u0026branch=master)](https://github.com/nukdokplex/rule34-posts-wrapper/actions/workflows/ci.yml)\n[![Codecov](https://img.shields.io/codecov/c/gh/nukdokplex/rule34-posts-wrapper?token=FZ6UNF6GE1\u0026label=tests%20coverage)](https://app.codecov.io/gh/nukdokplex/rule34-posts-wrapper)\n[![GitHub Repo stars](https://img.shields.io/github/stars/nukdokplex/rule34-posts-wrapper)](https://github.com/nukdokplex/rule34-posts-wrapper)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/Rule34-Posts-Wrapper?label=PyPI%20d-loads%3A)](https://pypi.org/project/Rule34-Posts-Wrapper/)\n\n![Rule34 Posts Wrapper](https://github.com/nukdokplex/rule34-posts-wrapper/raw/master/cover.png)\n\nThis is a [rule34.paheal.net](https://rule34.paheal.net) wrapper that turns your query into an iterable list of posts\nwith the most important information about them.\n\nConsider supporting this project. You can buy me a cup of tea (I don't drink coffee).\n- Bitcoin: [bc1qmr5m0z4p0gzqnfrztamrrpmgkw79725dsqdp03](bitcoin:BC1QMR5M0Z4P0GZQNFRZTAMRRPMGKW79725DSQDP03)\n- Ethereum: 0xb0627eBDb226b4D972661637091573596c5B3B7a\n\n## Installation\n\nTo install:\n```shell\npip install rule34-posts-wrapper\n```\nOr for development/testing purposes, clone and run:\n```shell\npip install -e .[development]\npre-commit install\n```\n\n## Usage\n\n### PostsWrapper\n\nTo start import ``PostsWrapper`` and call it:\n```python\nfrom rule34_posts_wrapper import PostsWrapper\n\nposts = PostsWrapper(['your', 'query', 'here'])[0].file\n```\n\nNote that there is **no authentication** for now so you can't use more than three tags in your query.\n\nNow you can iterate the posts in cycle:\n```python\nfor post in posts:\n    print(str(post.file) + \" - \" + \" \".join(post.tags)) # Do whatever you want with Post object\n```\n\nAlso you can just interact with it like ``list``\n\n```python\nfirst_post = posts[0]\nprint(str(first_post.thumbnail))\n```\nNote that all URLs are ``urllib3.util.Url``, call ``str(posts[x].link)`` to convert it to ``str``.\n\n### TagsWrapper\n\nLike ``PostsWrapper``, ``TagsWrapper`` provides you iterable list of ``Tag``'s:\n\n```python\nfrom rule34_posts_wrapper import TagsWrapper\n\ntags = TagsWrapper(\"Your_Query_Here\")\n\nprint(f\"Found {len(tags)} tags:\", end=\"\\n\\n\")\nfor tag in tags:\n    print(f\"Tag: {tag.name}, Count: {tag.count}\")\n```\n\nIt uses [rule34.paheal.net](https://rule34.paheal.net) autocomplete that helps you find tags by it's starting\nsubstring.\n\n## Testing\n\nTo run all tests, just use this command:\n```shell\ntox -e py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnukdokplex%2Frule34-posts-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnukdokplex%2Frule34-posts-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnukdokplex%2Frule34-posts-wrapper/lists"}