關於web爬蟲的tips


  1. 網站爬蟲限制默認在心中
    robots.txt 

  2. 爬一個網站怎麼預測爬的量
    wKioL1f_JWTxdMPaAAFOeUgpBVA343.png-wh_50
    wKioL1f_JjjyJfqcAAJZguuELa8672.png-wh_50

  3. 每個網站都使用各種各樣的技術,怎麼確定網站使用的技術
    pip install builtwith

     >>> import builtwith

     >>> builtwith.parse('http://www.douban.com')

    {u'javascript-frameworks': [u'jQuery'], u'tag-managers': [u'Google Tag Manager'], u'analytics': [u'Piwik']}



  4. #網站的所屬者
    pip install python-whois
    >>> print whois.whois('cnblogs.com')
    {
      "updated_date": [
        "2014-11-12 00:00:00", 
        "2014-11-12 01:07:15"
      ], 
      "status": [
        "clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited", 
        "clientTransferProhibited https://icann.org/epp#clientTransferProhibited"
      ], 
      "name": "du yong", 
      "dnssec": "unsigned", 
      "city": "Shanghai", 
      "expiration_date": [
        "2021-11-12 00:00:00", 
        "2021-11-11 04:00:00"
      ], 
      "zipcode": "201203", 
      "domain_name": [
        "CNBLOGS.COM", 
        "cnblogs.com"
      ], 
      "country": "CN", 
      "whois_server": "whois.35.com", 
      "state": "Shanghai", 
      "registrar": "35 Technology Co., Ltd.", 
      "referral_url": "http://www.35.com", 
      "address": "Room 312, No.22 BOXIA Rd, Pudong New District", 
      "name_servers": [
        "NS3.DNSV4.COM", 
        "NS4.DNSV4.COM", 
        "ns3.dnsv4.com", 
        "ns4.dnsv4.com"
      ], 
      "org": "Shanghai Yucheng Information Technology Co. Ltd.", 
      "creation_date": [
        "2003-11-12 00:00:00", 
        "2003-11-11 04:00:00"
      ], 
      "emails": [
        "[email protected]", 
        "[email protected]"
      ]
    }


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章