https://github.com/moodrain/pixiv-tool
simple tool for pixiv and pixiv-fanbox
https://github.com/moodrain/pixiv-tool
Last synced: about 2 months ago
JSON representation
simple tool for pixiv and pixiv-fanbox
- Host: GitHub
- URL: https://github.com/moodrain/pixiv-tool
- Owner: moodrain
- Created: 2020-03-03T13:39:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-29T18:15:10.000Z (over 1 year ago)
- Last Synced: 2024-04-01T00:28:59.113Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 30.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
$session = 'YourPHPSessionId';
$pixivId = 'PixivUserId';
$fanboxId = 'FanboxUserId';
$socks5 = '127.0.0.1:1080';$pixiv = new Pixiv();
$pixiv->socks5($socks5);
$pixiv->sessionId($session);
$postIds = $pixiv->getAllPostIds($pixivId);
$posts = $pixiv->getPostByIds($pixivId, array_slice($postIds, 0, 20));
$pixiv->downloadPosts($pixivId, 'path/to/save');$fanbox = new Fanbox();
$fanbox->sessionId($session);
$fanbox->socks5($socks5);
$posts = $fanbox->getPosts($fanboxId, 10);
$fanbox->downloadPosts($fanboxId, 'path/to/save');
```