吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 30982|回复: 120
收起左侧

[Java 转载] 妹子图网站图片爬虫

    [复制链接]
罗克希的泪 发表于 2018-11-24 23:01
可以爬妹子图的所有图片,保存到本地,默认保存到e:/00目录下,请确保该目录存在;
需要在java环境下运行,
使用方式:在该文件目录下 cmd窗口执行   java -jar meizi-1.0.jar
链接: https://pan.baidu.com/s/1YJFaHUk635QhpPbGz85Snw 提取码: z6ph
妹子图官网,https://www.mzitu.com/

TIM图片20181124225431.png

点评

爬了1900多张图,给需要的···链接:https://pan.baidu.com/s/10j2CnamVWnYXPUohnA8pjQ 提取码:ho61  发表于 2018-11-25 13:07

免费评分

参与人数 25吾爱币 +29 热心值 +28 收起 理由
DreamOfLand + 1 + 1 我很赞同!
gromhellsc + 1 我很赞同!
小悠z + 1 + 1 欢迎分析讨论交流,吾爱破解论坛有你更精彩!
chen180 + 1 我怕了14W张图。。
无fuck可说 + 8 + 8 谢谢@Thanks!
氢氧化钙 + 1 + 1 谢谢@Thanks!
ljhwcdrrd + 1 + 1 厉害了,小老板
流浪天涯 + 1 + 1 热心回复!
xswwain + 1 + 1 用心讨论,共获提升!
纳兰丶 + 1 + 1 吾爱接过了汤不热的大旗
时空之外 + 1 + 1 用心讨论,共获提升!
xiaozhu963 + 1 + 1 我很赞同!
龙木木 + 1 + 1 谢谢@Thanks!
小栓罪啊 + 1 热心回复!
Docteur + 1 + 1 热心回复!
qc731600347 + 1 + 1 我很赞同!
宇longer + 1 + 1 我很赞同!
lanf + 1 + 1 我很赞同!
admh + 1 谢谢@Thanks!
常辰 + 1 谢谢@Thanks!
冥界3大法王 + 1 学习了,发现好多光定定的女妖,哈哈哈哈。
617664734 + 1 我很赞同!
renyangyu + 1 + 1 谢谢@Thanks!
pj2016 + 1 + 1 虽然不是很黄,但是还得备足营养快线,哈
sfoto2011 + 1 + 1 这个厉害了,赶紧收藏。

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

ClearLover 发表于 2018-11-25 19:48
本帖最后由 ClearLover 于 2018-11-26 15:24 编辑

额。。我把201页全部下载了,然后发现有很多空文件夹,还有的文件夹里只有一张照片。。。
望周知
然后下载好了打包上传到百度云了,比点评那个的多一点,有需要的投币拿走吧
链接: https://pan.baidu.com/s/11zD1lqZhT-B38AX-viO6Jw 提取码: 1024

1.png
忘了说了,压缩包的解压密码是:
www.52pojie.cn_Clearlover


丧心病狂啊。。。保存五次,下载十一次才两个人投币,呜呜呜。。。不和你们玩了

点评

感谢分享  发表于 2018-12-6 12:37

免费评分

参与人数 11吾爱币 +11 热心值 +10 收起 理由
752979025 + 1 + 1 感谢此楼分享。就这帖子可以。python试了好久不行。试了好几天。执念太深。.
宙斯 + 1 + 1 我很赞同!
z小伟style + 1 + 1 谢谢@Thanks!老哥你真给力!
江岁寒 + 1 + 1 我很赞同!
倪嗷嗷 + 1 + 1 谢谢@Thanks!
fangxiansheng + 1 + 1 热心回复!
Leung.某某 + 1 + 1 我很赞同!
alone痴 + 1 我很赞同!
现世孤独 + 1 + 1 热心回复!
反正都一样 + 1 + 1 谢谢@Thanks!
alinwan0922 + 1 + 1 我很赞同!

查看全部评分

xiaomingtt 发表于 2020-3-4 13:40
本帖最后由 xiaomingtt 于 2020-3-4 21:20 编辑

来个简单版本,啥也不用装,打开记事本,粘贴下面的代码,保存为VBS格式文件,双击,妹子就来了。
[Visual Basic] 纯文本查看 复制代码
path = "D:\核心价值观.{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
u = "https://www.mzitu.com/all/"
s = HttpRequest(u, "GET", "", "", "")
Set html = CreateObject("htmlfile")
html.designMode = "on"
html.write s
For Each M In html.getElementsByTagName("p")
    if M.classname = "url" then 
        For Each A in M.getElementsByTagName("a")
            href = A.getAttribute("href")
            if not(downlog(href, path, "read")) then 
                title = A.innertext
                title = replace(replace(replace(replace(title,"\",""),"/",""),"*",""),"?","")
                title = replace(replace(replace(replace(title,"<",""),">",""),"|",""),":","")
                title = replace(replace(replace(title,chr(34),""),vblf,""),vbcr,"")
                GetIMG href, title, path
                wscript.sleep GetRandom(20000,30000)
            end if 
        Next
    end if 
Next
 
msgbox "下载完成"
 
Sub GetIMG(url, title, path)
    j = 1 
    do 
        nextpage = true
        u = url & "/" & j
        j = j + 1
        r = HttpRequest(u, "GET", "", "", "")
        Set htm = CreateObject("htmlfile")
        htm.designMode = "on"
        htm.write r
        For Each D In htm.getElementsByTagName("div")
            if D.classname = "main-image" then 
                Set img = D.getElementsByTagName("img")
                src = img(0).getAttribute("src")
                filename = right(src,len(src) - instrrev(src,"/"))
                download src, title & "\" & filename, path
            end if 
            if D.classname = "pagenavi" then
                For Each P In D.getElementsByTagName("span")
                    if instr(P.innerText , "下一组") then
                        nextpage = false 
                    end if 
                Next
            end if 
        Next
        wscript.sleep GetRandom(3000,6000)
    loop until nextpage = false 
    downlog url, path, "write"
End Sub
 
 
Function HttpRequest(url, mode, cook, data, cookies)
'地址,GET/POST,getcookie/setcookie/download,请求数据, cookies
    on error resume next 
    Set cHttp = CreateObject("WinHttp.WinHttpRequest.5.1")
    With cHttp
        .SetTimeouts 80000, 80000, 80000, 80000
        .Open mode, url, False
        If cook = "setcookie" Then .SetRequestHeader "Cookie", cookies
        .SetRequestHeader "User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36" 
        if mode = "POST" then
            .SetRequestHeader "content-Type", "application/x-www-form-urlencoded"
            .SetRequestHeader "Content-Length", Len(data)
        end if 
        .SetRequestHeader "Referer", url
        .SetRequestHeader "Cache-Control", "no-cache"
        .SetRequestHeader "Connection", "keep-alive"
        .Send data
        If .WaitForResponse Then
            If .Status = 200 Then
                If cook = "getcookie" Then
                    HttpRequest = GetCookie(.getAllResponseHeaders)
                ElseIf cook = "download" then 
                    HttpRequest =.responseBody  
                Else
                    HttpRequest =.responseText  
                End If
            End If
        End If
    End With
End Function
  
Function GetCookie(str)
    a = InStr(str, "Set-Cookie: ")
    If a = 0 Then
        GetCookie = ""
    Else
        b = InStr(a, str, ";")
        c = Mid(str, a + 12, b - a - 11)
        Cookie = c
        Do
            d = InStr(b, str, "Set-Cookie: ")
            If d = 0 Then Exit Do
            e = InStr(d, str, ";")
            f = Mid(str, d + 12, e - d - 11)
            b = e
            Cookie = Cookie & " " & f
        Loop
        GetCookie = Cookie
    End If
End Function
 
 
Sub download(url, target, path)
    Set fso=CreateObject("scripting.FileSystemObject")
    target = path & "\" & target
    p = left(target,instrrev(target,"\"))
    If Not FSO.FolderExists(p) Then fso.CreateFolder(p)
    Const adTypeBinary = 1
    Const adSaveCreateOverWrite = 2
    Set ado = createobject("Adodb.Stream")
    ado.Type = adTypeBinary
    ado.Open
    ado.Write HttpRequest(url, "GET", "download", "", "")
    ado.SaveToFile target, 2
    ado.Close
End Sub
 
Function downlog(u, path, mode)
    Set fso=CreateObject("scripting.FileSystemObject")
    If Not FSO.FolderExists(path) Then fso.CreateFolder(path)
    file = path & "\download.log"
    if mode = "read" then 
        if fso.FileExists(file) then
            set f = fso.opentextfile(file)
            logs = f.readall
            if instr(logs, u) then downlog = true else downlog = false  
            f.close 
        else
            set f = fso.createtextfile(file)
            f.writeline ""
            f.close 
            downlog = false 
        end if 
    else
        set f = fso.opentextfile(file,8)
        f.writeline u
        f.close
    end if 
End Function

Function GetRandom(min,max)
	Randomize
	GetRandom = Int((max - min + 1) * Rnd + min)
End Function 

免费评分

参与人数 1吾爱币 +1 热心值 +1 收起 理由
sreeny + 1 + 1 没用啊~~~

查看全部评分

kevink1 发表于 2020-7-27 17:56
黑羽乂一方 发表于 2018-11-24 23:09
厉害了。。。。。。。
止戈ing 发表于 2018-11-24 23:10
为何你如此优秀~
lucky. 发表于 2018-11-24 23:10

为何你如此优秀
织梦幻之舞 发表于 2018-11-24 23:14
感谢分享
莉莉里 发表于 2018-11-24 23:19
谢谢分享.
fantec 发表于 2018-11-24 23:20
很有用,十分感谢楼主的分享!
2000xiaolin 发表于 2018-11-24 23:22
好久没看过这些网站了。戒了。。。
DarkMare 发表于 2018-11-24 23:28
有用…………但是营养不够啊……
Moon3r 发表于 2018-11-24 23:28
谢谢分享链接
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-4-29 09:22

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表