Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryohidaka/pixiv-sql
Python library to backup pixiv user data to SQLite DB.
https://github.com/ryohidaka/pixiv-sql
pixiv pixivpy
Last synced: about 2 months ago
JSON representation
Python library to backup pixiv user data to SQLite DB.
- Host: GitHub
- URL: https://github.com/ryohidaka/pixiv-sql
- Owner: ryohidaka
- License: mit
- Created: 2024-05-11T16:27:35.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-10-17T00:23:32.000Z (3 months ago)
- Last Synced: 2024-10-19T00:51:41.443Z (3 months ago)
- Topics: pixiv, pixivpy
- Language: Python
- Homepage: https://pypi.org/project/pixiv-sql/
- Size: 132 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# pixiv-sql
[![PyPI version](https://badge.fury.io/py/pixiv-sql.svg)](https://badge.fury.io/py/pixiv-sql)
![build](https://github.com/ryohidaka/pixiv-sql/workflows/Build/badge.svg)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)Python library to backup pixiv user data to SQLite DB.
## Installation
You can install this library using PyPI:
```shell
pip install pixiv-sql
```## Usage
### Create dataBase file
```bash
touch db/my_pixiv.db
```### Get `refresh_token`
> To get `refresh_token`, see
> [@ZipFile Pixiv OAuth Flow](https://gist.github.com/ZipFile/c9ebedb224406f4f11845ab700124362)
> or
> [OAuth with Selenium/ChromeDriver](https://gist.github.com/upbit/6edda27cb1644e94183291109b8a5fde)### Initialize the PixivSQL class with your Pixiv user ID, refresh token, and database:
```python
user_id = "your_user_id"
refresh_token = "your_refresh_token"
database = "db/my_pixiv.db"app = PixivSQL(user_id, refresh_token, database)
```### You can then fetch your bookmarked illusts and insert them into the database:
```python
app.bookmarked_illusts()
```## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.