Giter Club home page Giter Club logo

Comments (3)

jht3QAQ avatar jht3QAQ commented on September 2, 2024

这仓库都四年没维护了2333 如果让我维护我可能会选择用python重写(逃)

from pixivspider.

SharkPika avatar SharkPika commented on September 2, 2024

其实我想学学java怎么做爬虫才搜到你这个仓库的

from pixivspider.

jht3QAQ avatar jht3QAQ commented on September 2, 2024

润python吧 代码量起码能少一半
如果单论爬虫的话 无非就是生成请求然后去下载罢了
生成请求获取图片列表->遍历图片列表去下载
翻翻我这里源代码能找到我之前找的一些P站的API
像下面这些之类的

https://www.pixiv.net/ajax/search/artworks/{kw}?word={kw}&mode=safe&p=1&type=all&&lang=zh&s_mode=s_tag
https://www.pixiv.net/ajax/user/{uid}/profile/all?lang=zh
https://www.pixiv.net/ajax/user/{uid}/profile/illusts?ids[]={ids}work_category=illustManga&is_first_page=1&lang=zh
https://www.pixiv.net/ajax/illust/{pid}/pages?lang=zh

如果你想做p站的爬虫应该能用的上 这些api返回的都是json 解析一下就能找到自己想要的数据 具体点下面的链接就能懂了

https://www.pixiv.net/ajax/search/artworks/genshin?word=genshin&mode=r18&p=1&type=all&lang=zh&s_mode=s_type
https://www.pixiv.net/ajax/user/52542337/profile/all?lang=zh
https://www.pixiv.net/ajax/user/52542337/profile/illusts?ids[]=118201101&ids[]=117777980&work_category=illustManga&is_first_page=1&lang=zh
https://www.pixiv.net/ajax/illust/118201101/pages?lang=zh

就这么构造请求 去获取json 获取根据画师/关键字获取图片列表 再根据图片列表获取图片的url 然后下载就好

from pixivspider.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.