Atitit.資料擷取器 dataspider

來源:互聯網
上載者:User

標籤:

 

 

 

 

Atitit.資料擷取器 dataspider

 

 

/atiplat_cms/src/com/attilax/WebInfoX.java  @dep

 

 

http://cl.cmcher.com/thread0806.php?fid=16&search=&page=2

 

 

/atiplat_cms/src/com/attilax/dataspider/TsaolyoNetDataSpider.java

 

爬蟲注意事項

設定useragent as ff

https的注意。。

 

 

主要是因為Java自己的HttpURLConnection對SSL支援的不好,而且控制起來不太方便,而且HttpClient還支援抓取非信任的網站,別的實現方式貌似需要在代碼中顯式匯入認證。

 

作者:: 綽號:老哇的爪子 ( 全名::Attilax Akbar Al Rapanui 阿提拉克斯 阿克巴 阿爾 拉帕努伊 ) 漢字名:艾龍,  EMAIL:[email protected]

轉載請註明來源: http://www.cnblogs.com/attilax/

 

 

需要override打三個函數

 

public List<String> getpageUrls() 

public List getArtListByPagehtml(String html) {

public List<String> getPics_byHtml

 

使用方法與參數

 

 

TsaolyoNetDataSpider x = new TsaolyoNetDataSpider();

// x.fileName=args[0];// "c:\\r2.csv";

 

x.picSaveDir = "c:\\0picSaveDir";

x.startPage = Integer.parseInt(System.getProperty("startPage", "1"));

x.endPage = Integer.parseInt(System.getProperty("endPage"));

;

 

 x.exec();

 

Atitit.資料擷取器 dataspider

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.