需求用例:
希望把中国好声音第三季的好歌弄成DVD,然后又没有那些广告,又能点播。
故:笼统的每期视频不能满足我的要求,我需要单独的mv。
经过搜索发现腾讯等网站均由热心网友弄出来了,本例用"专辑《中国好声音》第三季MV纯享版"介绍。
这个专辑有138首单曲mv,硕鼠下载器能一个一个的下载,但是下到你手软,作为程序员出生坚决努力解决大家的困扰。
用google chrome查看源码:
虽然是第一次用硕鼠,但是觉得他应该设计有批量下载功能,所以就得把这些html中的url地址解析出来,利用各种工具组合玩。
正则表达式应该是比较不错的选择,把<ul>中的所有代码拷贝出来,我这里用到一个正则表达式工具:
2015年规则:
示例地址:http://v.qq.com/cover/4/45f3076vo82ekvj/f0017x4p2k3.html
1、第一次找出所有“纯享版”的视频,正则如下 href="/cover/.*title="纯享版
我的匹配结果:
MATCH[0]: 'href="/cover/4/45f3076vo82ekvj/a0017564f5h.html" class="_videolink" ut="2015-08-21 23:46:45" tags="" source="腾讯视频" data-hasbullet="1" sv="a0017564f5h" data-voteid="" tl="2258" pt="0" pw="0" bt="0" data-c_openbc="1" data-showmark="0" id="a0017564f5h" title="纯享版' [index=13300] MATCH[1]: 'href="/cover/4/45f3076vo82ekvj/c0017e45fp3.html" class="_videolink" ut="2015-08-21 22:55:58" tags="" source="腾讯视频" data-hasbullet="1" sv="c0017e45fp3" data-voteid="" tl="141" pt="0" pw="0" bt="0" data-c_openbc="1" data-showmark="1" id="c0017e45fp3" title="纯享版' [index=24998] MATCH[2]: 'href="/cover/4/45f3076vo82ekvj/m00172t0t2z.html" class="_videolink" ut="2015-08-21 22:11:55" tags="" source="腾讯视频" data-hasbullet="1" sv="m00172t0t2z" data-voteid="" tl="275" pt="0" pw="0" bt="0" data-c_openbc="1" data-showmark="1" id="m00172t0t2z" title="纯享版' [index=18214] MATCH[3]: 'href="/cover/4/45f3076vo82ekvj/g0017eli401.html" class="_videolink" ut="2015-08-21 22:48:22" tags="" source="腾讯视频" data-hasbullet="1" sv="g0017eli401" data-voteid="" tl="159" pt="0" pw="0" bt="0" data-c_openbc="1" data-showmark="1" id="g0017eli401" title="纯享版' [index=22881] MATCH[4]: 'href="/cover/4/45f3076vo82ekvj/b0017ofw8b4.html" class="_videolink" ut="2015-08-21 22:23:43" tags="" source="腾讯视频" data-hasbullet="1" sv="b0017ofw8b4" data-voteid="" tl="293" pt="0" pw="0" bt="0" data-c_openbc="1" data-showmark="1" id="b0017ofw8b4" title="纯享版' [index=19383] MATCH[5]: 'href="/cover/4/45f3076vo82ekvj/k0017abvrr1.html" class="_videolink" ut="2015-08-21 22:45:30" tags="" source="腾讯视频" data-hasbullet="1" sv="k0017abvrr1" data-voteid="" tl="130" pt="0" pw="0" bt="0" data-c_openbc="1" data-showmark="1" id="k0017abvrr1" title="纯享版' [index=21732] MATCH[6]: 'href="/cover/4/45f3076vo82ekvj/k0017rllpzb.html" class="_videolink" ut="2015-08-21 22:53:34" tags="" source="腾讯视频" data-hasbullet="1" sv="k0017rllpzb" data-voteid="" tl="135" pt="0" pw="0" bt="0" data-c_openbc="1" data-showmark="1" id="k0017rllpzb" title="纯享版' [index=23940] MATCH[7]: 'href="/cover/4/45f3076vo82ekvj/f0017x4p2k3.html" class="_videolink" ut="2015-08-21 22:27:54" tags="" source="腾讯视频" data-hasbullet="1" sv="f0017x4p2k3" data-voteid="" tl="250" pt="0" pw="0" bt="0" data-c_openbc="1" data-showmark="1" id="f0017x4p2k3" title="纯享版' [index=20551] MATCH[8]: 'href="/cover/4/45f3076vo82ekvj/j0017t4wbc5.html" class="_videolink" ut="2015-08-21 23:06:03" tags="" source="腾讯视频" data-hasbullet="1" sv="j0017t4wbc5" data-voteid="" tl="124" pt="0" pw="0" bt="0" data-c_openbc="1" data-showmark="1" id="j0017t4wbc5" title="纯享版' [index=27120] MATCH[9]: 'href="/cover/4/45f3076vo82ekvj/u0017v52riq.html" class="_videolink" ut="2015-08-21 21:28:49" tags="" source="腾讯视频" data-hasbullet="1" sv="u0017v52riq" data-voteid="" tl="208" pt="0" pw="0" bt="0" data-c_openbc="1" data-showmark="1" id="u0017v52riq" title="纯享版' [index=14505] MATCH[10]: 'href="/cover/4/45f3076vo82ekvj/h0017ybgt51.html" class="_videolink" ut="2015-08-21 21:38:25" tags="" source="腾讯视频" data-hasbullet="1" sv="h0017ybgt51" data-voteid="" tl="302" pt="0" pw="0" bt="0" data-c_openbc="1" data-showmark="1" id="h0017ybgt51" title="纯享版' [index=15716] MATCH[11]: 'href="/cover/4/45f3076vo82ekvj/a0017qeqnww.html" class="_videolink" ut="2015-08-21 21:54:01" tags="" source="腾讯视频" data-hasbullet="1" sv="a0017qeqnww" data-voteid="" tl="236" pt="0" pw="0" bt="0" data-c_openbc="1" data-showmark="1" id="a0017qeqnww" title="纯享版' [index=16899] MATCH[12]: 'href="/cover/4/45f3076vo82ekvj/z0017xjtwmu.html" class="_videolink" ut="2015-08-21 23:05:01" tags="" source="腾讯视频" data-hasbullet="1" sv="z0017xjtwmu" data-voteid="" tl="136" pt="0" pw="0" bt="0" data-c_openbc="1" data-showmark="1" id="z0017xjtwmu" title="纯享版' [index=26060] MATCH[13]: 'href="/cover/4/45f3076vo82ekvj/z0017xjtwmu.html" class="figure _videolink" tabindex="0" title="纯享版' [index=25533] MATCH[14]: 'href="/cover/4/45f3076vo82ekvj/k0017rllpzb.html" class="figure _videolink" tabindex="0" title="纯享版' [index=23416] MATCH[15]: 'href="/cover/4/45f3076vo82ekvj/j0017t4wbc5.html" class="figure _videolink" tabindex="0" title="纯享版' [index=26599] MATCH[16]: 'href="/cover/4/45f3076vo82ekvj/c0017e45fp3.html" class="figure _videolink" tabindex="0" title="纯享版' [index=24477] MATCH[17]: 'href="/cover/4/45f3076vo82ekvj/a0017564f5h.html" class="figure _videolink" tabindex="0" title="纯享版' [index=12683] MATCH[18]: 'href="/cover/4/45f3076vo82ekvj/a0017qeqnww.html" class="figure _videolink" tabindex="0" title="纯享版' [index=16283] MATCH[19]: 'href="/cover/4/45f3076vo82ekvj/m00172t0t2z.html" class="figure _videolink" tabindex="0" title="纯享版' [index=17462] MATCH[20]: 'href="/cover/4/45f3076vo82ekvj/u0017v52riq.html" class="figure _videolink" tabindex="0" title="纯享版' [index=13856] MATCH[21]: 'href="/cover/4/45f3076vo82ekvj/h0017ybgt51.html" class="figure _videolink" tabindex="0" title="纯享版' [index=15082] MATCH[22]: 'href="/cover/4/45f3076vo82ekvj/k0017abvrr1.html" class="figure _videolink" tabindex="0" title="纯享版' [index=21104] MATCH[23]: 'href="/cover/4/45f3076vo82ekvj/g0017eli401.html" class="figure _videolink" tabindex="0" title="纯享版' [index=22295] MATCH[24]: 'href="/cover/4/45f3076vo82ekvj/b0017ofw8b4.html" class="figure _videolink" tabindex="0" title="纯享版' [index=18767] MATCH[25]: 'href="/cover/4/45f3076vo82ekvj/f0017x4p2k3.html" class="figure _videolink" tabindex="0" title="纯享版' [index=19938]
2、第二次在匹配URL,正则表达式:href="/cover/.*" class
3、第三次在拼接成URL, REGEX:MATCH.*=" Replace:http://v.qq.com
3、第三次在拼接成URL, REGEX:" class.* Replace:
看到上图了么,report框中就是我们要用的东东,把它拷贝到source框中,还需要继续处理:
html代码前半截好了,report框中就是我们要用的东东,把它拷贝到source框中,继续正则处理:
又接近一步了,report框中就是我们要用的东东,把它拷贝到source框中,继续正则:
ok,大功告成一半,将report内容拷贝保存到桌面,假如名字叫:1.html
然后在硕鼠浏览器中打开刚才这个1.html文件:
提取页面中的全部连接,
弹出如下图:
发现被坑了,只要url就行了
还是用正则表达式,直播到此纠结了,正则表达式就是个人解决了,我把好声音的地址弄出来也算是补偿一下,我也是受害者:
http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=l00155k89bp http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=s0015pmkgfz http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=v00156ax7k0 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=i00154ilrrk http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=g0015f0ct5o http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=y0015uy9ivi http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=f0015lcf3tz http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=x0015jg8zli http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=o0015wug7d1 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=n0015nn8tpt http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=g0015pc2xo7 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=v00156pgi10 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=w0015kkhppi http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=f0015rffpsj http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=d001510j89a http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=e00156hu65m http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=e0015raq21v http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=p0015n1t168 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=k0015285wrv http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=o00158x8dmy http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=i001574xo87 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=h00159n55af http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=n0015ou7em0 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=j0015lhubk4 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=l0015n487zt http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=n0015dsmdkx http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=u00159vaahr http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=m0015gy1gj5 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=s00155f579c http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=w0015fjico2 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=c00152k43d5 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=e0015cnb2h1 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=d0015ly978r http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=r00151jgmmx http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=f0015sobtcr http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=l0015e6vtq2 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=s0015m2mmdo http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=k001557nkeq http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=b0015ef7gcp http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=r0015w6pxp7 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=k00159kmu65 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=l00154bxzsc http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=h0015cuc4id http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=i0015xlfpuz http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=n0015hx4gl8 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=b00154kz9ao http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=y0015iwkh8p http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=t0015doramn http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=s0015703z4d http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=q0015zghmgi http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=y00155sgknn http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=z0015ddieav http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=z0015d9c7i5 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=o0015yonezg http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=v00159pb7xi http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=i00153xnfvx http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=b00158yyy9z http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=q0015q8byr1 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=u0015yua1az http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=h0015hx95n0 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=f0015salwlq http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=h0015w2iw84 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=g0015z8r9zz http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=j0015dfujkq http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=w001573uaxm http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=s00152hu9e3 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=v00154km1u1 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=j0015dc6i5m http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=g0015ty2rcs http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=s0015rfg25e http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=w0015vy12w0 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=l0015n1sf8c http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=o00154sba8l http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=p0015gop82i http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=k0015jrmwgj http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=w0015lhc5qu http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=y0015ijfgzg http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=w00157rc5sy http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=y00159rx7jf http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=i0015bzvcdb http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=y0015qcrlki http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=h0015vpp7br http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=j001513yipu http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=z0015y8dqp3 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=e00156jxeeo http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=y0015ese3wq http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=f0015p09uv9 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=t0015joym85 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=f001554rjh5 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=a0015hdk1e5 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=g0015gtkiph http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=u0015qwfp5p http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=t00154k0dde http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=e0015h3ea2w http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=m0015ih00in http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=v0015r2buo4 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=j0015hoqw4p http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=s0015rtczm1 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=u0015ig3mm4 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=h0015k1otci http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=v0015z67am6 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=p00158dbow3 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=s00158ztyxu http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=r0015w8aw4v http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=d00145ew6wn http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=y0014btmfj1 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=l0014dh6efg http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=v0014e7kfea http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=l0014b55obm http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=n0014sblkzv http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=b0014ep6tjb http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=p0014xx27zf http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=p00142sl5ps http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=t00144b06ip http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=p0014dlg6au http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=m0014pxr6ms http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=g00141kfigg http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=z0014ibjvtz http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=s0014mjcxcz http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=c0014hu5ij4 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=x0014z734gs http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=d00145hksb2 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=c0014n0q7z5 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=x00141xvoc3 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=r0014ren2k2 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=b0014lkdf3n http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=o00147njyey http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=s0014xttanj http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=u0014yvijhr http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=p00146nj9w3 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=u0014nu7t0f http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=q00140lqjje http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=q0014j8u7iv http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=o00146p04c7 http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=c0014lmtigr http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=l00140wgt6q http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=y0014cwzc5m http://v.qq.com/cover/n/nwib907tqtfjoi9.html?vid=d0014hy0do6
二十个二十个的进行下载,悲剧虽有vip,硕鼠补偿我一下嘛,我邮箱:liaojifeng$163.com