V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
xdays
V2EX  ›  Python

获取网站名和域名的对应关系方案

  •  
  •   xdays ·
    xdays · Oct 23, 2013 · 5406 views
    This topic created in 4578 days ago, the information mentioned may be changed or developed.
    input: www.baidu.com
    output: www.baidu.com ,百度

    目前我所考虑的找到的方法:

    1. http://data.alexa.com/data?cli=10&dat=snbamz&url=www.baidu.com ,通过这个借口确实能拿到不少信息,但似乎没有中文的网站名

    2. 爬网页从title标签里提取,这个难点在于:如果把“百度一下,你就知道”这类的字符串总结为百度

    3. http://www.alexa.cn/index.php?url=www.baidu.com 这个最有价值,但是遇到两点问题:
    3.1 网站有防护,我刚爬了30多个域名,就被“Access Denied”
    3.2 数据的权威性,不知道这个网站是哪家的

    4. http://aws.amazon.com/cn/awis/ ,这个基本是1的收费版本,提供的信息应该差不多。


    大家还有其他的方案么?
    10 replies    1970-01-01 08:00:00 +08:00
    bshu
        1
    bshu  
       Oct 23, 2013
    国内的正规网站去遍历 icp 备案数据库
    qiayue
        2
    qiayue  
    PRO
       Oct 23, 2013
    看你的具体需求了,如果不是需要全网所有网站的数据,而是只需要一部分有名/有流量的网站的话,手工去填都很快,数据也准确。

    “世界上 95% 的网站每天只有不到30个IP的流量,里面还包括了自己及亲戚朋友的访问”
    mengzhuo
        3
    mengzhuo  
       Oct 23, 2013
    whois信息里没有?
    shiny
        4
    shiny  
    PRO
       Oct 23, 2013
    爬网址导航或者开放目录。
    dongbeta
        5
    dongbeta  
       Oct 23, 2013
    收集一大批网址导航站,用爬虫去爬链接提取 A 标签的相关信息。
    xdays
        6
    xdays  
    OP
       Oct 23, 2013
    @shiny @dongbeta 这种方式都是通过爬虫构建一个数据库,这个库很难全面。
    xdays
        7
    xdays  
    OP
       Oct 23, 2013
    @mengzhuo whois信息里没有中文网站名
    xdays
        8
    xdays  
    OP
       Oct 23, 2013
    @qiayue 量还还是挺大的,需要通过技术手段解决。
    xdays
        9
    xdays  
    OP
       Oct 23, 2013
    @bshu 有推荐库的没?
    xiya
        10
    xiya  
       Dec 25, 2013
    爬一些备案信息,定义关键字呢?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2674 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 15:59 · PVG 23:59 · LAX 08:59 · JFK 11:59
    ♥ Do have faith in what you're doing.