https://github.com/mirukana/pydecensooru
Uncensor Danbooru posts with Python
https://github.com/mirukana/pydecensooru
banned better booru bypass danbooru decensooru gold lunafind lunakit member python-library python3 uncensor
Last synced: 3 months ago
JSON representation
Uncensor Danbooru posts with Python
- Host: GitHub
- URL: https://github.com/mirukana/pydecensooru
- Owner: mirukana
- License: lgpl-3.0
- Created: 2018-11-20T02:14:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-20T23:38:51.000Z (over 7 years ago)
- Last Synced: 2025-09-29T05:21:54.591Z (8 months ago)
- Topics: banned, better, booru, bypass, danbooru, decensooru, gold, lunafind, lunakit, member, python-library, python3, uncensor
- Language: Python
- Size: 21.5 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# pydecensooru
[](
http://pepy.tech/project/pydecensooru)
[](
https://pypi.org/projects/pydecensooru)
[](
https://pypi.python.org/pypi/pydecensooru)
A Python module using [Decensooru](https://github.com/friendlyanon/decensooru)
data to automatically fill any Danbooru post's missing info keys.
The Decensooru `id:md5.ext`
[batches](https://github.com/friendlyanon/decensooru/tree/master/batches)
will be silently fetched and kept up-to-date in your user
data directory,
e.g. *~/.local/share/pydecensooru* on GNU/Linux by default.
Originally developed for transparent usage with
[lunafind](https://github.com/mirukan/lunafind).
## Examples
```python3
>>> import requests
>>> from pydecensooru import decensor, decensor_iter
# Decensoring a single post if it needs to be:
>>> p2 = requests.get("https://danbooru.donmai.us/posts/2.json").json()
>>> "file_url" in p2
False
>>> p2d = decensor(p2)
>>> "file_url" in p2d
True
>>> p2["file_ext"]
'png'
# Transparently decensoring any post that needs it in a search:
>>> posts = requests.get("https://danbooru.donmai.us/posts.json?tags=id:1..10").json()
>>> print(type(posts), type(posts[0]))
>>> "file_url" in posts[-2]
False
>>> posts = list(decensor_iter(posts))
>>> "file_url" in posts[-2]
True
```