The pixivScraper project aims to provide a simple API written in pure C language to automate the downloading of artworks from the website pixiv It also provides a simple CLI tool to download the artworks manually.
- Download the latest release
- Extract the files
- Done
General case: call <path to the pixivScraper executable> <command name> <additional parameters>.
Some examples:
- Call
./pixivScraper.exe helpto display information about pixivScraper commands. - Call
./pixivScraper.exe help <command name>to display more information about a pixivScraper command. - Call
./pixivScraper.exe dlUser <userId>to download all the artworks of a user. - Call
./pixivScraper.exe dlIllustrationsto download a list of artworks from a list of illustration ids (default:./illustrationList.txt).
Seven commands are available for now:
dlIllustrationDownloads an illustration from its illustration id.dlIllustrationsDownloads a list of illustrations from a text file of illustration ids.dlImageDownloads an image from its url.dlImagesDownloads a list of images from a text file of urls.dlUserDownloads a user's artworks from its user id.dlUsersDownloads the artworks of a list of users from a text file of user ids.helpShows information about pixivScraper commands.
The following additional parameters come into effect for most commands:
-d <destination>Specifies where the ressources should be downloaded.-l <path to the list>Specifies the path to a list of imageUrls/illustrationIds/userIds we want to download.-p <parallel downloads>Specifies the maximum concurrent downloads to process.
For more information, use the help command.
- Download the latest libcurl SDK release at
https://curl.se/download.html - Extract the
bin,includeandlibfolders into your project's files - Download the latest cJSON release at
https://github.com/DaveGamble/cJSON/releases - Extract the
cJSON.hand thecJSON.cfiles to your include folder and your source folder - Download the latest pixivLib SDK release
- Extract the
includeandsrcfolders into your project's files - Include the headers
curl/curl.handpixivLib.hin your main file
!!! pixivLib does not initialize libcurl. Be sure to call curl_global_init() at least once per program before using any function of pixivLib and curl_global_cleanup() at the end.
Six functions are available for now:
pixiv_downloadImage()Downloads an image from its url.pixiv_downloadIllustration()Downloads an illustration from its illustration id.pixiv_downloadUser()Downloads a user's artworks from its user id.pixiv_downloadImages()Downloads a list of images from a text file of urls.pixiv_downloadIllustrations()Downloads a list of illustrations from a text file of illustration ids.pixiv_downloadUsers()Downloads the artworks of a list of users from a text file of user ids.
See the prototypes in the header file for more information.