Robots.txt 是一個 text file ,上傳在網頁伺服器目的是有部份網頁只想供給內部同司觀看。 寫出來目的是不想街外人閱讀。 Robots.txt 放在 index page root
directory. 當一個搜尋 robot 訪問一個站時,它首先爬行檢查該網站根目錄下是否存在
robots.txt
Robots.txt content User-agent:* Disallow:
User-agent:* = 允許被網絡搜尋引擎搜尋到 User-agent: Googlebot = 只允許
Google 搜尋引擎搜尋到
Robots.txt content Disallow: = 不允許搜尋路徑 = 0 Disallow:/ = 不允許搜尋網站訪問任何部份 Disallow:/ images = 不允許搜尋網站訪問圖片 Allow:/ = 允許搜尋網站訪問任何部份
Index page <html> <head> <title>…</title> <meta name = “robots” content =
“all”> 指示搜尋引擎可以沿著 robots.txt 中的指示搜尋該網頁
User-agent 目錄 BaiduSpider = www.baidu.com YodaoBot = www.yodao.com ia_archiver = www.alexa.com Googlebot = www.google.com Sosospider = www.soso.com Yahoo!+Slurp+China = www.yahoo.com.cn MSNBOT = search.msn.com Sogou+web+spider = www.sogou.com Googlebot-image = Google image Scooter = AltaVista Lycos = Lycos NorthernLight = Gulliver Fast = Fast Excite, WebCrawler = ArchitextSpider DirectHit = Grabber Infoseek = Infoseek
圖片註解 <IMG ALT = “ 為慶祝聖誕 , 海洋公園活潑好動嘅企鵝團隊首次向全港巿民帶來聖誕祝福 , 祝大家聖誕快樂 ! Merry
Christmas!” SRC = “oceanpark-pengiun.jpg”>
網絡蜘蛛 web spider 網絡蜘蛛基本原理
網絡蜘蛛是通過網頁的鏈接地址來尋找網頁,從網站某一個頁面(通常是首頁)開始爬入,讀取網頁的內容,找到在網頁中的其它鏈接地址 ,然後通過這些鏈接地址尋找下一個網頁,這樣一直循環下去,直到把這個網站所有的網頁都抓取完為止。
黑帽例子 色情網頁,分類廣告,假圖片註解,垃圾關鍵字堆砌。 將文字顏色設定為與網頁景相同或者近似的顏色。 在文章中加入大量垃圾文字。 選項 <input type = “hidden”> 垃圾文字 Noframe 註解中加入關鍵字,而網頁不存在框架。
Youtube Downloader http://www.dvdvideosoft.com/produ
cts/dvd/Free-YouTube-Download.htm
詹瑞文再笑唐英年《硬膠人生》http://www.youtube.com/watch?v=oK6SlJBDVow