贴码了 为了煎蛋网的妹子 看电脑多了需要养眼

偷笑养眼的来了。。。

#include <Inet.au3>
Local $urlgen="http://jandan.net/ooxx/page-"


func downpic($url,$dirname,$filename)
   sleep(100)
   Local $hDownload =InetGet($url,@ScriptDir&"\"&$dirname&"\"&$filename,8,1)
   Do
	  Sleep(50)
	  ConsoleWrite(".")
   Until InetGetInfo($hDownload, 2)
   ConsoleWrite(@crlf)
   Sleep(100)
EndFunc

Func imgurl($body,$num)
   local $b=0
   $b=StringInStr($body,'<img src="')
   if $b=0 Then
	  ConsoleWrite(@CRLF&"===========download "&$num&" over=============="&@CRLF)
	  Return
   EndIf
   local $body1=""
   $body1=StringTrimLeft($body,$b+9)
   ;ConsoleWrite($b&@crlf)
   local $c=0
   $c=StringInStr($body1,'"')
   ;ConsoleWrite($c&@CRLF)
   local $url=""
   $url=StringLeft($body1,$c-1)
   local $filename1=""
   $filename1=StringTrimLeft($url,StringInStr($url,'/',0,-1))
   ConsoleWrite($url&@crlf)
   ;ConsoleWrite($filename1&@CRLF)
   ConsoleWrite("-----------------------------------"&@CRLF)
   Local $body2=""
   $body2=StringTrimLeft($body1,$c)
   
   ;呼叫下载函数
   downpic($url,$num,$filename1)
   Sleep(100)
   ;递归剩下的
   imgurl($body2,$num)
EndFunc

local $maxnum=0,$html="",$b=0
$html=_INetGetSource("http://jandan.net/ooxx")
Sleep(100)
$b=StringInStr($html,'<!-- begin comments -->')
$c=StringInStr($html,'<!-- end comments -->')
$body=StringMid($html,$b,$c-$b)
$b=StringInStr($body,'>[')
$c=StringInStr($body,']')
$maxnum=StringMid($body,$b+2,$c-$b-2)
ConsoleWrite("当前最大系统页面数:"&$maxnum&@CRLF)
local $downnum=$maxnum
$downnum=InputBox("下载提示","你想下载的最大页面数,在该页数与最大页数("&$maxnum&")之间的图片将全部下载",$maxnum)

While $maxnum>=$downnum
   ConsoleWrite("current download is :"&$maxnum&@crlf)
   DirCreate (@ScriptDir&"\"&$maxnum)
   local $html="",$curl=""
   $curl=$urlgen&$maxnum
   ConsoleWrite("curent download url is :"&$curl&@CRLF)
   $html=_INetGetSource($curl)
   
   Sleep(100)
   local $b=0,$c=0,$body=""
   $b=StringInStr($html,'<!-- begin comments -->')
   $c=StringInStr($html,'<!-- end comments -->')
   $body=StringMid($html,$b,$c-$b)
   imgurl($body,$maxnum)
   $maxnum=$maxnum-1
   Sleep(100)
WEnd
MsgBox(0,"提示","下载完了",5)


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值