Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/twtrubiks/pttimagespider
PTT 圖片下載器 (抓取整個看板的圖片,並用文章標題作為資料夾的名稱 ) (使用Scrapy)
https://github.com/twtrubiks/pttimagespider
download image ptt python scrapy spider
Last synced: 3 months ago
JSON representation
PTT 圖片下載器 (抓取整個看板的圖片,並用文章標題作為資料夾的名稱 ) (使用Scrapy)
- Host: GitHub
- URL: https://github.com/twtrubiks/pttimagespider
- Owner: twtrubiks
- Created: 2016-02-08T12:54:11.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-24T15:47:08.000Z (over 7 years ago)
- Last Synced: 2024-10-30T19:03:38.311Z (3 months ago)
- Topics: download, image, ptt, python, scrapy, spider
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 18
- Watchers: 2
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PTT 爬蟲圖片下載器 (使用Scrapy) PttImageSpider
抓取PTT整個看板的圖片,並用文章標題作為資料夾的名稱
* [Demo Video](https://www.youtube.com/watch?v=B78ZYEjkSaY) - Linux V2 (demo )
* [Demo Video](https://youtu.be/6BHiLOtsW2Y) - Linux V1 (教學+demo )## 特色
* 抓取PTT特定看板全部的圖片
* 使用文章標題作為資料夾的名稱
* 下載圖片速度非常快,1分鐘可抓600張圖片,平均每秒10張## 使用方法
```cmd
scrapy crawl ptt_img_spider
```如需抓其他PTT的看板,需要修改路徑 PttImageSpider/PttImageSpider/spiders/pttspider.py 檔案裡的
```python
start_urls = ["https://www.ptt.cc/bbs/AKB48/index.html"]
```將網址修改為其他看板的網址,範例如下
```python
start_urls = ["https://www.ptt.cc/bbs/NounenRena/index.html"]
```## 執行畫面
![alt tag](http://i.imgur.com/loYZHTi.jpg)
有些看板的網頁頁數非常多,所以如果要強迫終止,可以按 Ctrl + Z 強制結束程式
## 輸出格式
![alt tag](http://i.imgur.com/Uc6tDcr.jpg)
![alt tag](http://i.imgur.com/CFiUo7E.jpg)## 執行環境
* Ubuntu 12.04
* Python 2.7.3
* Scrapy 1.0.4## License
MIT license