Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

PTT 圖片下載器 (抓取整個看板的圖片,並用文章標題作為資料夾的名稱 ) (使用Scrapy)

Notifications You must be signed in to change notification settings

yntense/PttImageSpider

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
7 Commits
 
 
 
 
 
 

Repository files navigation

PTT 爬蟲圖片下載器 (使用Scrapy) PttImageSpider

抓取PTT整個看板的圖片,並用文章標題作為資料夾的名稱

特色

  • 抓取PTT特定看板全部的圖片
  • 使用文章標題作為資料夾的名稱
  • 下載圖片速度非常快,1分鐘可抓600張圖片,平均每秒10張

使用方法

scrapy crawl ptt_img_spider

如需抓其他PTT的看板,需要修改路徑 PttImageSpider/PttImageSpider/spiders/pttspider.py 檔案裡的

start_urls = ["https://www.ptt.cc/bbs/AKB48/index.html"]

將網址修改為其他看板的網址,範例如下

start_urls = ["https://www.ptt.cc/bbs/NounenRena/index.html"]

執行畫面

alt tag

有些看板的網頁頁數非常多,所以如果要強迫終止,可以按 Ctrl + Z 強制結束程式

輸出格式

alt tag alt tag

執行環境

  • Ubuntu 12.04
  • Python 2.7.3
  • Scrapy 1.0.4

License

MIT license

About

PTT 圖片下載器 (抓取整個看板的圖片,並用文章標題作為資料夾的名稱 ) (使用Scrapy)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.