谷歌音乐页面变了!

3 views
Skip to first unread message

amoblin

unread,
Apr 24, 2009, 9:20:51 AM4/24/09
to gmbox-dev
今天下不了榜单了,一开始我还以为是代码哪里写错了,检查到最后发现不是代码的问题,是谷歌改变页面布局了!
现在的热榜页没有Downlaod BottomBorder了,于是改用Related BottomBorder来判断添加到列表,而下
载ID则在Icon BottomBorder下依title寻找。下面是修改后的gmbox.py从热榜页面下载的html部分代码(经过编码转换
的,但为什么还有乱码呢?)

<table id="song_list" cellspacing="0" cellpadding="0"
class="SongList">
<!--freemusic_song_result_S40dbcfe0c610fa09-->
<tr id="rowS40dbcfe0c610fa09" class="SongItem BottomBorder"
onmouseover="_sl_onMouseOverSongItem(&quot;S40dbcfe0c610fa09&quot;);"
onmouseout="_sl_onMouseOutSongItem(&quot;S40dbcfe0c610fa09&quot;);">
<td class="Checkbox BottomBorder"><input type="checkbox"
name="item_toggle" id="S40dbcfe0c610fa09" value="S40dbcfe0c610fa09"
onclick="_sl_onClickCheckbox(this); return true;"></td>
<td class="number BottomBorder">1.</td>
<td class="Title BottomBorder"><a href="javascript:void(0)"
name="StreamingLink" oncontextmenu="return false;" onclick="return
_sl_onclickStreaming(&quot;/music/url?q\x3dhttp%3A%2F%2Fwww.google.cn
%2Fmusic%2Ftop100%2Fplayer_iframe%3Fid%3DS40dbcfe0c610fa09%26type
%3Dsong%26autoplay%3Dtrue\x26resnum\x3d100\x26ct\x3dpl\x26cad\x3dchart
\x26cd\x3d1\x26ei\x3dWZ7xSei8GKPQswKe2s66AQ&quot;);">花蝴蝶</a>
</td>
<td class="Trend BottomBorder"><img alt="" src="/music/images/
trend_steady.gif"></td>

<td class="Artist BottomBorder">
<a href="/music/url?q=%2Fmusic%2Fartist%3Fid
%3DA24c74921880d4aa0&amp;resnum=100&amp;ct=nav&amp;cad=chart&amp;cd=1&amp;ei=WZ7xSei8GKPQswKe2s66AQ"
style="white-space:nowrap;">蔡依林</a></td>

<td class="Related BottomBorder"><a href="/music/url?q=%2Fmusic
%2Fsong%3Fid
%3DS40dbcfe0c610fa09&amp;ct=nav&amp;cad=chart&amp;ei=WZ7xSei8GKPQswKe2s66AQ"
oncontextmenu="return false;" id="SimilarityS40dbcfe0c610fa09" title="根
据音乐特质找到与花蝴蝶相似的歌曲">相似歌曲</a></td>
<td class="Icon BottomBorder">
<a href="javascript:void(0)" name="StreamingLink" title="试听"
oncontextmenu="return false;" onclick="return _sl_onclickStreaming
(&quot;/music/url?q\x3dhttp%3A%2F%2Fwww.google.cn%2Fmusic
%2Ftop100%2Fplayer_iframe%3Fid%3DS40dbcfe0c610fa09%26type%3Dsong
%26autoplay%3Dtrue\x26resnum\x3d100\x26ct\x3dpl\x26cad\x3dchart\x26cd
\x3d1\x26ei\x3dWZ7xSei8GKPQswKe2s66AQ&quot;);"><img src="/music/images/
play_icon.gif" alt="试听"></a></td>
<td class="Icon BottomBorder"><a href="javascript:void(0)"
name="StreamingLink" title="加入播放列表" oncontextmenu="return false;"
onclick="return _sl_onclickStreaming(&quot;/music/url?q\x3dhttp%3A%2F
%2Fwww.google.cn%2Fmusic%2Ftop100%2Fplayer_iframe%3Fid
%3DS40dbcfe0c610fa09%26type%3Dsong%26autoplay%3Dfalse\x26resnum
\x3d100\x26ct\x3dpl\x26cad\x3dchart\x26cd\x3d1\x26ei
\x3dWZ7xSei8GKPQswKe2s66AQ&quot;);"><img src="/music/images/
addsong_icon.gif" alt="加入播放列表"></a></td>
<td class="Icon BottomBorder"><a href="javascript:void(0)" title="下
载" oncontextmenu="return false;" onclick="window.open(&quot;/music/url?
q\x3dhttp%3A%2F%2Fg.top100.cn%2F7872775%2Fhtml%2Fdownload.html%3Fid
%3DS40dbcfe0c610fa09\x26resnum\x3d100\x26ct\x3ddl\x26cad\x3dchart\x26cd
\x3d1\x26ei\x3dWZ7xSei8GKPQswKe2s66AQ&quot;, '',
&quot;resizable\x3d0, status\x3d0, width\x3d650, height
\x3d350&quot;);
return false;"><img src="/music/images/download_icon.gif" alt="下
载"></a></td>
<td class="Icon BottomBorder"><a href="javascript:void(0)" title="歌
词" oncontextmenu="return false;" onclick="window.open(&quot;/music/url?
q\x3dhttp%3A%2F%2Fg.top100.cn%2F7872775%2Fhtml%2Flyrics.html%3Fid
%3DS40dbcfe0c610fa09\x26resnum\x3d100\x26ct\x3dlr\x26cad\x3dchart\x26cd
\x3d1\x26ei\x3dWZ7xSei8GKPQswKe2s66AQ&quot;, '',
&quot;resizable\x3d1, scrollbars\x3d0, status\x3d0, width\x3d450,
height\x3d510&quot;);
return false;"><img src="/music/images/lyrics_icon.gif" alt="歌词"></
a></td>
</tr>
</table>

从中看出下载页面url变了,
http://g.top100.cn/7872775/html/download.html?id=S40dbcfe0c610fa09
而在下载页面,下载链接藏于一个iframe里,我还不知道怎么找到具体url。
下面是源码:
<html>
<head>
<script type="text/javascript" src="../javascript/compiled/
static_page.js"></script>
<script type="text/javascript">
window.onload = function() {
_onloadDownloadPage();
}
window.onresize = function() {
_onWindowResize('download-iframe');
}
</script>
</head>
<body style="margin: 0px;">
<iframe id="download-iframe" src="" width="650" height="350"
frameborder="0" scrolling="no"/>
</body>
</html>

amoblin

unread,
Apr 24, 2009, 9:41:36 AM4/24/09
to gmbox-dev

lerosua

unread,
Apr 24, 2009, 9:45:03 AM4/24/09
to gmbo...@googlegroups.com
看来要等骨头出手了
我等帮顶...

amoblin

unread,
Apr 24, 2009, 9:46:17 AM4/24/09
to gmbox-dev
用wget下载第一个地址,结果在
ERROR 400: Bad Request.
后就卡住了,ctrl+c结束后,最后会发现真实url。如下:

laputa@laputa-laptop:~/gmbox$ wget
http://www.google.cn/music/top100/url?q=http%3A%2F%2Ffile3.top100.cn%2F200904242142%2F139F730279283EAF3AAD3511BEB7B226%2FSpecial_123690%2F%25E8%258A%25B1%25E8%259D%25B4%25E8%259D%25B6.mp3&ct=rdl&cad=dl&ei=xsHxScCdC4iisQKv0eu6AQ&sig=3F1894692C0124FD2E7CBCAAE038E53C
--2009-04-24 21:42:47--
http://www.google.cn/music/top100/url?q=http%3A%2F%2Ffile3.top100.cn%2F200904242142%2F139F730279283EAF3AAD3511BEB7B226%2FSpecial_123690%2F%25E8%258A%25B1%25E8%259D%25B4%25E8%259D%25B6.mp3
Resolving www.google.cn... 203.208.39.104, 203.208.39.99
Connecting to www.google.cn|203.208.39.104|:80... [1] 26481
[2] 26482
[3] 26483
[4] 26484
[2] Done ct=rdl
[3] Done cad=dl
[4]+ Done ei=xsHxScCdC4iisQKv0eu6AQ
laputa@laputa-laptop:~/gmbox$ connected.
HTTP request sent, awaiting response... 400 Bad Request
2009-04-24 21:42:47 ERROR 400: Bad Request.


[1]+ Exit 1 wget
http://www.google.cn/music/top100/url?q=http%3A%2F%2Ffile3.top100.cn%2F200904242142%2F139F730279283EAF3AAD3511BEB7B226%2FSpecial_123690%2F%25E8%258A%25B1%25E8%259D%25B4%25E8%259D%25B6.mp3


On Apr 24, 9:41 pm, amoblin <amob...@gmail.com> wrote:
> 第一首:花蝴蝶http://g.top100.cn/7872775/html/download.html?id=S40dbcfe0c610fa09
> 下载页右键复制链接地址的结果:http://www.google.cn/music/top100/url?q=http%3A%2F%2Ffile3.top100.cn%...
> 浏览器中输入上述地址后转为:http://file3.top100.cn/200904242126/CACD2A931A245597CE61B53A88707497/...
> 其中最后的%E8%8A%B1%E8%9D%B4%E8%9D%B6.mp3在我的火狐里显示为中文"花蝴蝶",粘到这里就乱了。
>
> 这是第二首:不要在寂寞时说爱我
>
> http://g.top100.cn/7872775/html/download.html?id=Saf76d6e6a33acb96
>
> http://www.google.cn/music/top100/url?q=http%3A%2F%2Ffile3.top100.cn%...
>
> http://file3.top100.cn/200904242134/4315973706390C6A924761CBD64CDBA2/...

LLY

unread,
Apr 24, 2009, 10:38:46 AM4/24/09
to gmbo...@googlegroups.com
太好了,榜单页面也有歌词了~~哇卡卡~

2009/4/24 amoblin <amo...@gmail.com>

崔贵林

unread,
Apr 24, 2009, 10:42:57 AM4/24/09
to gmbo...@googlegroups.com
原来没有歌词吗?那我们还要增加歌词同步播放功能了。。。

2009/4/24 LLY <bone...@gmail.com>



--
崔贵林 csip
E-mail:  amo...@gmail.com
MSN :  amo...@msn.cn
  Cell  :  13260179436

LLY

unread,
Apr 24, 2009, 11:34:11 AM4/24/09
to gmbo...@googlegroups.com
之前的榜单页面里是没有歌词的下载的,正琢磨着怎么取到正确的歌词呢..
PS: 下载功能已经恢复

2009/4/24 崔贵林 <amo...@gmail.com>
Reply all
Reply to author
Forward
0 new messages