下载4399 flash小游戏.swf文件

重温4399,感慨良多!想下载一个喜欢的游戏到本地,却有少许波折~

一按f12,咦?怎么没反应?

哦!禁用了呀,那就在更多工具->开发人员工具打开

没曾想,找不到swf文件!

放进js里了?那这swf文件下载地址咋找...

又不想找别人的工具下载,一气之下,把源码爬下来分析-

import requests
resp = requests.get(url='http://www.4399.com/flash/44333_1.htm')
with open('1.txt','w',encoding='utf-8') as f:
    f.write(resp.text)

发现这样一个路径:

upload_swf/ftp2/hanbao/20101213/3.swf
从下面找到的.
'''<div id="gamebox" style="position:relative;">
		            <div id="loadingdiv" style="display:block"></div>
          <div style="top:0;left:0;z-index:122;" id="addiv">
            <script language="javascript" type="text/javascript">show_gameload_Func("/loadimg/loading.htm")</script>          </div>
          <div id="swfdiv"><div id="pusher"></div>
		  <center id="game"><SCRIPT LANGUAGE='javascript'>
var str1 = '/upload_swf/ftp2/hanbao/20101213/3.swf';document.write ("<OBJECT ID='flashgame' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='' width='750' height='563'>");document.write ("<PARAM NAME='allowScriptAccess' VALUE='never'>");document.write ("<PARAM NAME='allowNetworking' VALUE='internal'>");document.write ("<PARAM NAME='movie' VALUE='" + webServer + str1 + "'>");document.write("<embed id='flashgame1' name='flashgame' src='" + webServer + str1 + "' quality='high' pluginspage='//www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='750' height='563' allowScriptAccess='nerver' allowNetworking='internal'></embed>");document.write ("<PARAM NAME='quality' VALUE='high'>");document.write ("</OBJECT>");</SCRIPT></center></div>
		  <div id="fullpage2" class="method" style="right:0px;display:none">
              <iframe scrolling="no" frameborder="0" src="about:blank"></iframe>
              <span title="²é¿´²Ù×÷˵Ã÷" onclick="chgTips();return false;"></span>
          </div>'''

具体游戏的swf路径有了,那下载地址在哪呢?

继续探索(其实就是找文章参考),拼上了完整的url:

http://s1.4399.com/4399swf//upload_swf/ftp2/hanbao/20101213/3.swf

完美!用迅雷下载,swf文件到手

很简单粗糙的方法,具体每个游戏还要看情况爬取(h5就不行)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值