推荐学习书目
› 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
pc10201
V2EX  ›  Python

yinyuetai.com音悦台 80万数据采集

  •  
  •   pc10201 · Dec 26, 2013 · 9332 views
    This topic created in 4698 days ago, the information mentioned may be changed or developed.
    音悦台是国内最大的高清MV音乐分享平台,也是国内最大的音乐MV视频媒体平台;提供最新、最快、最高清的MV视频资讯,并提供不同格式的高清MV下载,只为让好歌与你随身而行。

    要采集的字段包括URL,标题,播放次数,收藏次数,以及标签

    采集技巧:

    1.mv的id是连续并且递增的,比如http://v.yinyuetai.com/video/833486
    那就从1到833486,当然有一些是不存在的,即404错误,最终采集到83万数据,有82000多是不存在的,10%左右

    2.播放次数,收藏次数在源代码中是看不到的
    是另外加载了一个js文件,即
    http://v.yinyuetai.com/video/video-statis-info?videoId=%s
    %s代表mv的id
    比如
    http://v.yinyuetai.com/video/video-statis-info?videoId=833486

    3.音悦台没有进行采集限制,我开了50个线程,几个小时就采集完了

    采集的数据csv格式下载地址
    http://pan.baidu.com/s/1i3kKh73

    建议用emeditor打开,或者导入到mysql中,用excel打开后果自负哈

    ​
    33 replies  •  1970-01-01 08:00:00 +08:00
    varrily
    varrily
    Dec 26, 2013
    1
    还以为把mv文件采集出来了
    pc10201
    pc10201
    OP
    Dec 26, 2013❤️1
    2
    @varrily 有了url,可以用维棠软件批量下载
    Ansen
    Ansen
    Dec 26, 2013
    3
    与其数据,我更新关心脚本
    slax
    slax
    Dec 26, 2013
    4
    我擦... 我会告诉你我就是音悦台的嘛....
    manhere
    manhere
    Dec 26, 2013
    5
    音悦台那也叫高清....
    chervun
    chervun
    Dec 26, 2013
    6
    啧啧……
    xujialiang
    xujialiang
    Dec 26, 2013
    7
    服务器 压力山大啊
    faceair
    faceair
    Dec 26, 2013
    8
    @slax 莫名的喜感 233333
    dizzy
    dizzy
    Dec 26, 2013
    9
    @pc10201 LZ,能否看下你写的代码,学习下。
    letitbesqzr
    letitbesqzr
    Dec 26, 2013
    10
    同想看看代码...python多线程一直掌握的不太好,很多种写法.. 自己写的总控制不好琐。。
    pc10201
    pc10201
    OP
    Dec 26, 2013
    11
    @letitbesqzr 我没有用锁,就是用了一个队列
    pc10201
    pc10201
    OP
    Dec 26, 2013
    12
    @dizzy 具体代码就不分享的,基本上就是依照这个代码的思路
    https://github.com/pycurl/pycurl/blob/master/examples/retriever.py
    mechille
    mechille
    Dec 26, 2013
    13
    @slax
    @faceair 喜感+1.不懂LZ这帖的目的...
    ScotGu
    ScotGu
    Dec 26, 2013
    14
    @slax 喜感~~ 想知道你的感受。。
    dizzy
    dizzy
    Dec 26, 2013
    15
    @pc10201 好的。
    csx163
    csx163
    Dec 26, 2013
    16
    楼主...都是标题啊,当初我可是弄的直接下载地址啊
    tryv2eex
    tryv2eex
    Dec 26, 2013
    17
    @csx163 @admin 看看
    tryv2eex
    tryv2eex
    Dec 26, 2013
    18
    v2ex 还是没有哪几个国外网站好 我是说用户体验 忽略上面的回复 只是在try v2ex
    tryv2eex
    tryv2eex
    Dec 26, 2013
    19
    对了 每次发新帖都要刷新一次页面? 试试
    tryv2eex
    tryv2eex
    Dec 26, 2013
    20
    好象是的 刷新以后 居然又回到了页面顶端 我用的是Chrome 用用其他浏览器看看
    tryv2eex
    tryv2eex
    Dec 26, 2013
    21
    Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1141, in _when_complete
    callback()
    File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1162, in _execute_method
    self._when_complete(method(*self.path_args, **self.path_kwargs),
    File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 2293, in wrapper
    return method(self, *args, **kwargs)
    File "/www/v2ex/galaxy/handlers/web/topic.py", line 74, in post
    return self.finalize('topic/newbie.html')
    File "/www/v2ex/galaxy/handlers/web/__init__.py", line 74, in finalize
    o = template.render(self.values)
    File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
    File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
    File "/www/v2ex/galaxy/templates/desktop/topic/newbie.html", line 1, in top-level template code
    {% extends 'desktop/common/layout0.html' %}
    File "/www/v2ex/galaxy/templates/desktop/common/layout0.html", line 63, in top-level template code
    {% block wrapper %}
    File "/www/v2ex/galaxy/templates/desktop/common/layout0.html", line 126, in block "wrapper"
    {% block main %}
    File "/www/v2ex/galaxy/templates/desktop/topic/newbie.html", line 4, in block "main"
    <div class="header">{{ breadcrumb([node.title + ':/go/' + node.name, '创建新主题:/new/' + node.name, '请稍等']) }}</div>
    File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 397, in getattr
    return getattr(obj, attribute)
    UndefinedError: 'node' is undefined
    tryv2eex
    tryv2eex
    Dec 26, 2013
    22
    刚才v2ex出现了错误 一下子曝光好多信息 python tornado
    Keyes
    Keyes
    Dec 26, 2013
    23
    @tryv2eex 霍霍霍,tornado才是極品
    binux
    binux
    Dec 26, 2013
    24
    book.douban.com豆瓣读书 600+万数据采集

    1. id不是连续的,而且id不一定是数的,不过可以根据跳转后的域名是不是book判断
    http://book.douban.com/subject/25785270/

    2. 如何更全地获取全量数据
    由于douban是没有穷举接口的,要获取所有的书很不方便,于是有
    方案一:follow tag列表,但是会经常遇到重复的书,follow的量都快赶上书的量了
    方案二:isbn穷举,从dangdang、amazon、京东商品列表是可以遍历的,通过获取他们的图书信息,获得isbn库,通过 https://api.douban.com/v2/book/isbn/ 接口获得书的地址

    3. 豆瓣有防采集机制,大约每秒1个以上就会被封,早期导致我们的一个IP被封了一年
    解决方案:抓取公开的代理列表,通过代理抓取,多重试
    nimini
    nimini
    Dec 26, 2013
    25
    无图 你说个JB
    tryv2eex
    tryv2eex
    Dec 26, 2013
    26
    @没有这个人 会怎么样
    wolegequ
    wolegequ
    Dec 26, 2013
    27
    @tryv2eex我也曾有过这样的想法 各网站难道支持@功能了么, @功能难到没门槛的吗
    lj0014
    lj0014
    Dec 27, 2013 via Android
    28
    曾经遍历了豆瓣一亿以内的id...
    milkr
    milkr
    Dec 27, 2013 via iPhone
    29
    @slax 哈哈
    asca
    asca
    Dec 27, 2013
    30
    音悦台有水印,清晰度也不高,下载下来也没多大意思。
    slax
    slax
    Dec 27, 2013
    31
    @milkr 囧... 被爆菊的感脚,哈哈。
    kimcool
    kimcool
    Dec 27, 2013
    32
    @slax 常在路边走,哪能不湿鞋,哈哈,骂扶凯去
    slax
    slax
    Dec 31, 2013
    33
    @kimcool 应该把ID也弄成随机字符串...
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   880 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 54ms · UTC 20:55 · PVG 04:55 · LAX 12:55 · JFK 15:55
    ♥ Do have faith in what you're doing.