A Python script to manage Pixiv bookmarks by changing their visibility between public and private. Supports moving all bookmarks or filtering by specific tags.
- Change bookmark visibility from public to private or vice versa.
- Filter bookmarks by a predefined list of tags (e.g., NSFW tags).
- Process all public bookmarks or all private bookmarks.
- Automate repetitive tasks related to bookmark privacy on Pixiv.
- Python 3.9+ (developed on 3.12)
pixivpy3library
- Clone or download this repository.
- Install the required library:
pip install pixivpy3-
Obtain a Refresh Token: You need a
refresh_tokento interact with the Pixiv API. You can obtain this using tools like get-pixivpy-token. Follow the instructions in that repository to get your token. -
Configure the Script (Optional but Recommended):
- Open
pixiv_bookmark_manager.py. - Locate the line
REFRESH_TOKEN = "". - Replace the empty string
""with your obtainedrefresh_tokenbetween the quotes. For example:REFRESH_TOKEN = "your_actual_refresh_token_here"
- Open
-
Run the Script: Execute the script from your terminal:
python pixiv_bookmark_manager.py
- If you configured the
REFRESH_TOKENvariable, the script will use it automatically. - If
REFRESH_TOKENis left empty, the script will prompt you to enter the token when it starts.
- If you configured the
-
Follow the On-Screen Prompts:
- Choose the operation:
1: Move all public bookmarks to private.2: Move public bookmarks with specific tags to private.3: Move all private bookmarks to public.4: Move private bookmarks with specific tags to public.
- The script will fetch the bookmarks based on your selection and apply the visibility change.
- Choose the operation:
- Tags: The list of tags used for filtering is defined in the
DEFAULT_TAGSvariable at the beginning of the script. Modify this list to suit your needs.
This script interacts with the Pixiv API. Use it responsibly and in accordance with Pixiv's Terms of Service. Excessive or improper use might lead to temporary restrictions on your account. The author is not responsible for any consequences arising from the use of this script.
This project is released under The Unlicense.