Skip to content

twrandolphchen/PTT_Beauty_Spider

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PTT圖片下載器 (Python) For Windows and Linux

A crawler picture for web PTT

特色

  • 抓取PTT 圖檔(包含推文)
  • 可指定要抓取的看板以及推文數多少以上

輸出格式

  • 資料夾為文章標題加上推文數,資料夾內為圖片

使用方法

  • 方法一(指定看板抓圖)
python beauty_spider2.py [板名] [爬蟲起始的頁面] [爬幾頁] [推文多少以上] 
  • 方法二(指定網址抓圖)
python download_beauty.py [輸入內容.txt]

如果要從最新頁面開始爬 第一個參數請填 -1
爬蟲是利用 PTT 網頁版,所以頁面以網頁版為標準。
請參考:

https://www.ptt.cc/bbs/AKB48/index.html

執行範例

  • 範例一(指定看板抓圖)
python beauty_spider2.py beauty -1 3 10

爬PTT beauty板(表特板) 3頁 文章內容,然後只下載 推文數>=10 的文章內容圖片

執行畫面

alt tag

輸出畫面

alt tag alt tag

也可以指定其他看板,如下

python beauty_spider2.py AKB48 -1 3 10
  • 範例二(指定網址抓圖)
python download_beauty.py input.txt

爬 input.txt 檔案內的PTT文章連結圖片 , input.txt 檔案
alt tag

執行畫面

alt tag

輸出畫面

alt tag alt tag alt tag

執行環境

  • Python 2.7.3

License

MIT license

About

PTT 表特版爬蟲圖片下載器

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%