2015-03-30 76 views
1

我是新來的JavaScript,並想我的第一個項目是這樣的:如何從網站上抓取鏈接和圖片?

我嘗試使用JavaScript或php顯示通道上的所有縮略圖從源代碼採取渠道和縮略圖的名字從this site我網站。

這是我要趕在href =「此鏈接」和IMG SRC,但來自所有渠道:

<div class="browseThumb"> 
       <a href="/realmanpwns" target="_top"><img src="//thumbnails.vaughnsoft.com/1427753239/fetch/live/realmanpwns.png" class"browseThumb" width="200" height="113" /></a> 
       <div class="browseTxt" onclick="window.location = '/realmanpwns';"> 
        <a href="/realmanpwns" target="_top" class="browseTxt">realmanpwns</a> 
       </div> 
      </div> 

如何上手任何指導表示讚賞。

+0

請發表您已經嘗試過的解決方案的代碼... – 2015-03-30 22:21:20

+0

我沒有代碼:( – 2015-04-01 15:16:44

+0

做一些關於網頁抓取的研究,並嘗試一些東西,然後當你卡住了,我們可能會有所幫助。 – 2015-04-01 17:30:26

回答

0

我在最近的一個項目中使用了scrapy。當時不知道python,但我已經涉足了其他幾種語言,並不難找到答案。

他們有大量的資源可以借鑑。

這裏的直接鏈接: http://scrapy.org

PS。我與他們沒有任何關係,只是一個快樂的用戶。