All Projects → lonsty → scraper

lonsty / scraper

Licence: MIT license
图片爬取下载工具,极速爬取下载 站酷https://www.zcool.com.cn/, CNU 视觉 http://www.cnu.cc/ 设计师/用户 上传的 图片/照片/插画。

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to scraper

Scrapit
Scraping scripts for various websites.
Stars: ✭ 25 (-60.94%)
Mutual labels:  scraper, spider
Not Your Average Web Crawler
A web crawler (for bug hunting) that gathers more than you can imagine.
Stars: ✭ 107 (+67.19%)
Mutual labels:  scraper, spider
Avbook
AV 电影管理系统, avmoo , javbus , javlibrary 爬虫,线上 AV 影片图书馆,AV 磁力链接数据库,Japanese Adult Video Library,Adult Video Magnet Links - Japanese Adult Video Database
Stars: ✭ 8,133 (+12607.81%)
Mutual labels:  scraper, spider
Spidr
A versatile Ruby web spidering library that can spider a site, multiple domains, certain links or infinitely. Spidr is designed to be fast and easy to use.
Stars: ✭ 656 (+925%)
Mutual labels:  scraper, spider
ant
A web crawler for Go
Stars: ✭ 264 (+312.5%)
Mutual labels:  scraper, spider
Crawler
A high performance web crawler in Elixir.
Stars: ✭ 781 (+1120.31%)
Mutual labels:  scraper, spider
Geziyor
Geziyor, a fast web crawling & scraping framework for Go. Supports JS rendering.
Stars: ✭ 1,246 (+1846.88%)
Mutual labels:  scraper, spider
Gosint
OSINT Swiss Army Knife
Stars: ✭ 401 (+526.56%)
Mutual labels:  scraper, spider
Querylist
🕷️ The progressive PHP crawler framework! 优雅的渐进式PHP采集框架。
Stars: ✭ 2,392 (+3637.5%)
Mutual labels:  scraper, spider
Goribot
[Crawler/Scraper for Golang]🕷A lightweight distributed friendly Golang crawler framework.一个轻量的分布式友好的 Golang 爬虫框架。
Stars: ✭ 190 (+196.88%)
Mutual labels:  scraper, spider
Fbcrawl
A Facebook crawler
Stars: ✭ 536 (+737.5%)
Mutual labels:  scraper, spider
crawler-chrome-extensions
爬虫工程师常用的 Chrome 插件 | Chrome extensions used by crawler developer
Stars: ✭ 53 (-17.19%)
Mutual labels:  scraper, spider
Awesome Crawler
A collection of awesome web crawler,spider in different languages
Stars: ✭ 4,793 (+7389.06%)
Mutual labels:  scraper, spider
Mailinglistscraper
A python web scraper for public email lists.
Stars: ✭ 19 (-70.31%)
Mutual labels:  scraper, spider
Crawly
Crawly, a high-level web crawling & scraping framework for Elixir.
Stars: ✭ 440 (+587.5%)
Mutual labels:  scraper, spider
Django Dynamic Scraper
Creating Scrapy scrapers via the Django admin interface
Stars: ✭ 1,024 (+1500%)
Mutual labels:  scraper, spider
Xcrawler
快速、简洁且强大的PHP爬虫框架
Stars: ✭ 344 (+437.5%)
Mutual labels:  scraper, spider
Freshonions Torscraper
Fresh Onions is an open source TOR spider / hidden service onion crawler hosted at zlal32teyptf4tvi.onion
Stars: ✭ 348 (+443.75%)
Mutual labels:  scraper, spider
Linkedin Profile Scraper
🕵️‍♂️ LinkedIn profile scraper returning structured profile data in JSON. Works in 2020.
Stars: ✭ 171 (+167.19%)
Mutual labels:  scraper, spider
Colly
Elegant Scraper and Crawler Framework for Golang
Stars: ✭ 15,535 (+24173.44%)
Mutual labels:  scraper, spider

scraper

图片爬取下载工具,极速爬取下载 站酷(https://www.zcool.com.cn/)、CNU 视觉(http://www.cnu.cc/设计师/用户 上传的 图片/照片/插画

🎉 🎉 🎉 站酷下载工具已发布到 PyPI

scraper 本来是规划用来存放各式各样的爬虫程序的。站酷仅仅是当初构想中的一个,因为太懒而没有新增其他爬虫。 想不到 zcool.py 竟然从原来的几十行代码,逐步增加到现在的 500+ 行 😂 😂 😂

支持网站:

网站 入口 示例
Zcool 站酷 zcool.py python zcool.py -u 叁乔居
CNU 视觉 cnu.py python cnu.py http://www.cnu.cc/users/142231

Zcool 站酷

  • 极速下载:多线程异步下载,可以根据需要设置线程数
  • 超清原图:默认下载超清原图(约几 MB),使用参数 --thumbnail 下载缩略图(宽最大 1280px,约 500KB)
  • 下载收藏夹 New:使用 -c <收藏夹 URL, ...> 下载收藏夹中的作品(收藏夹可自由创建)

CNU 视觉

环境:

  • python3.6 及以上

快速使用

首先克隆项目到本地,并安装依赖:

$ git clone https://github.com/lonsty/scraper.git

$ cd scraper
$ pip install -r requirements.txt
  1. 下载 站酷(Zcool)作品

下载用户名为 username 的所有图片到路径 path 下:

$ python zcool.py -u <username> -d <path>

运行截图

screenshot_04.png

screenshot_03.png

screenshot_05.png

爬取结果

screenshot_02.png

  1. 下载 视觉(CNU)作品
python cnu.py <WORK_URLS> ...

使用帮助

常用命令

  1. 只下载用户的部分主题
$ python zcool.py -u <username> -t <topic1>,<topic2>,...
  1. 一次性下载多个用户的所有图片
$ python zcool.py -u <username1>,<username2>,...
  1. 部分图片下载失败或有更新,再执行相同的命令,对失败或新增的图片进行下载
$ python zcool.py -u <username> -d <last-saved-path>

查看所有命令

# Zcool 站酷
$ python zcool.py --help

Usage: zcool.py [OPTIONS]

  ZCool picture crawler, download pictures, photos and illustrations of
  ZCool (https://zcool.com.cn/). Visit https://github.com/lonsty/scraper.

Options:
  -u, --usernames TEXT    One or more user names, separated by commas.
  -i, --ids TEXT          One or more user IDs, separated by commas.
  -c, --collections TEXT  One or more collection URLs, separated by commas.
  -t, --topics TEXT       Specific topics to download, separated by commas.
  -d, --destination TEXT  Destination to save images.
  -R, --retries INTEGER   Repeat download for failed images.  [default: 3]
  -r, --redownload TEXT   Redownload images from failed records (PATH of the
                          .json file).
  -o, --overwrite         Override the existing files.
  --thumbnail             Download thumbnails with a maximum width of 1280px.
  --max-pages INTEGER     Maximum pages to download.
  --max-topics INTEGER    Maximum topics per page to download.
  --max-workers INTEGER   Maximum thread workers.  [default: 20]
  --help                  Show this message and exit.

# CNU 视觉
$ python cnu.py --help
Usage: cnu.py [OPTIONS] START_URLS...

  A scraper to download images from http://www.cnu.cc/

Arguments:
  START_URLS...  URLs of the works  [required]

Options:
  -d, --destination PATH          Destination directory to save the images
                                  [default: .]

  -o, --overwrite / -no, --no-overwrite
                                  Whether to overwrite existing images
                                  [default: False]

  -t, --thumbnail                 Whether to download the thumbnail images
                                  [default: False]

  -r, --retries INTEGER           Number of retries when the download fails
                                  [default: 3]

  -w, --workers INTEGER           Number of parallel workers  [default: 2]
  -c, --concurrency INTEGER       Number of concurrency  [default: 25]
  --delay INTEGER                 Seconds to wait for the next request
                                  [default: 0]

  --retry-delay INTEGER           Seconds to wait for the retry request
                                  [default: 0]

  --timeout INTEGER               Seconds of HTTP request timeout  [default:
                                  20]

  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.

  --help                          Show this message and exit.

更新历史

  • 0.1.5 (2020-12-27)

    • 新增爬虫:使用 ruia 异步爬虫框架下载 视觉(CNU)作品
  • 0.1.4 (2020-11-30)

    • 新增功能:新参数 -c <收藏夹 URL, ...>,支持下载收藏夹中的作品。
  • 0.1.3 (2020-07-22)

    • 修复了在动态加载页面中无法获取并下载所有图片的问题
    • 保存的图片文件名中加入了序号,以保持原始顺序
    • 添加了注释,并对代码细节做了调整
  • 2020.03.25

    • 优化了终端输出信息,用不同颜色文字进行了标识
    • 修复了在低网速下无法下载图片的问题,并加快了整体下载速度
  • 0.1.2 (2020-03-24)

    新功能:

    • 新增下载超清原图(默认选项,约几 MB),使用参数 --thumbnail 下载缩略图(宽最大 1280px,约 500KB)
    • 新增支持下载 JPG、PNG、GIF、BMP 格式的图片
  • 0.1.1 (2019-12-09)

    新功能:

    • 可以选择下载用户的特定主题
    • 支持一次性输入多个用户名或 ID

    BUG 修复:

    • 修复用户如果没有上传任何图片时的下载错误
  • 0.1.0 (2019-09-09)

    主要功能:

    • 极速下载:多线程异步下载,可以根据需要设置线程数
    • 异常重试:只要重试次数足够多,就没有下载不下来的图片 (^o^)/
    • 增量下载:设计师/用户有新的上传,再跑一遍程序就行了 O(∩_∩)O 嗯!
    • 支持代理:可以配置使用代理(0.1.3 版本后改为自动读取系统代理)

LICENSE

此项目使用 MIT 开源协议

注意:使用此工具下载的所有作品,版权归原作者所有,请谨慎使用!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].