标题: [网络连接] 如何利用批处理批量打开网页,并访问 [打印本页]
作者: Rasm 时间: 2023-5-25 12:39 标题: 如何利用批处理批量打开网页,并访问
本帖最后由 Rasm 于 2023-5-25 13:33 编辑
- start chrome.exe https://www.dismall.com//member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=retergis123&password=retergis123&quickforward=yes&handlekey=ls
复制代码
这是discuz一键登录的地址,我想通过批处理来实现一键批量登陆,但是我通过以上代码保存批处理后执行访问,
浏览器只打开了以下地址, https://www.dismall.com//member.php?mod=logging
后面的地址没有完整的去访问。导致一键登录无法正常实现。
请问下,要该如何写才能利用一键登录的地址,实现多账号一键登录。
以下是一键登录的地址,任意一条,手工放到浏览器里就能直接登陆了。但是通过批处理的话,要怎么写代码能实现呢- https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=123456vshjs&password=123456Vshjs@&quickforward=yes&handlekey=ls
- https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=12369938867zzy&password=12369938867Zzy@&quickforward=yes&handlekey=ls
- https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=45画江湖&password=45画江湖@&quickforward=yes&handlekey=ls
- https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=5797porn&password=5797Porn@&quickforward=yes&handlekey=ls
- https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=5941911a&password=5941911A@&quickforward=yes&handlekey=ls
- https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=5eyey7e&password=5Eyey7E@&quickforward=yes&handlekey=ls
- https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=79ytr&password=79Ytr@&quickforward=yes&handlekey=ls
- https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=98t98t98t98t&password=98T98T98T98T@&quickforward=yes&handlekey=ls
- https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=AA125732&password=Aa125732@&quickforward=yes&handlekey=ls
- https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=ASHENG123&password=Asheng123@&quickforward=yes&handlekey=ls
- https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=Arthurl&password=Arthurl@&quickforward=yes&handlekey=ls
复制代码
作者: 77七 时间: 2023-5-25 13:56
- @echo off
- for /f "delims=" %%a in ('type "%~0" ^|findstr /bc:"https"') do (
- start chrome.exe %%a
- timeout 1 >nul
- )
- exit
- rem 链接写在下方
- https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=123456vshjs&password=123456Vshjs@&quickforward=yes&handlekey=ls
- https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=12369938867zzy&password=12369938867Zzy@&quickforward=yes&handlekey=ls
复制代码
作者: Rasm 时间: 2023-5-25 15:53
回复 2# 77七
你好,他说是想吧用户名放1.txt,密码放2.txt,要如何修改下?
作者: jyswjjgdwtdtj 时间: 2023-5-25 18:11
这样多少不太稳定 不如用vbs操作ie
最好直接在浏览器里window.open或者iframe,比啥都强
现在的浏览器也有读文件,选文件的功能
作者: Rasm 时间: 2023-5-25 18:45
回复 4# jyswjjgdwtdtj
是啊,如果像我目前这种方式,要是登录50个的话,浏览器要卡死
目前的浏览器还是谷歌稳定点。
未请教,如果利用vbs,如何实现?
作者: jyswjjgdwtdtj 时间: 2023-5-25 18:57
回复 5# Rasm
set ie=createobject("internetexplorer.application")
ie.navigate "https://www.dismall.com//member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username=retergis123&password=retergis123&quickforward=yes&handlekey=ls"
ie.visible=true
作者: 77七 时间: 2023-5-25 20:52
回复 3# Rasm
- @echo off
- setlocal enabledelayedexpansion
- set "part1=https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username="
- set "part2=&password="
- set "part3=@&quickforward=yes&handlekey=ls"
- for /f "delims=" %%a in ('type "1.txt"') do (
- set /a n+=1
- set "#!n!=%%a"
- )
- for /f "delims=" %%a in ('type "2.txt"') do (
- set /a m+=1
- for %%b in (!m!) do (
- start chrome.exe "!part1!!#%%b!!part2!%%a!part3!"
- timeout 1 >nul
- )
- )
- exit
复制代码
作者: Rasm 时间: 2023-5-31 11:35
回复 7# 77七
依次批量打开URL并自动关闭的bat命令,也能实现吗
有时候打开太多,怕浏览器卡死
我想每 30秒关闭一次浏览器上的所有标签, 这样就不会让浏览器卡死了,直至吧 文本里的 地址全部打开一遍结束
作者: 77七 时间: 2023-5-31 13:43
回复 8# Rasm
- @echo off
- setlocal enabledelayedexpansion
- set "part1=https://www.dismall.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&fastloginfield=username&username="
- set "part2=&password="
- set "part3=@&quickforward=yes&handlekey=ls"
- for /f "delims=" %%a in ('type "1.txt"') do (
- set /a n+=1
- set "#!n!=%%a"
- )
- for /f "delims=" %%a in ('type "2.txt"') do (
- set /a m+=1,k=m%%30
- for %%b in (!m!) do (
- start chrome.exe "!part1!!#%%b!!part2!%%a!part3!"
- timeout 1 >nul
- )
- if !k! equ 0 (
- taskkill /f /im chrome.exe
- timeout 2 >nul
- )
- )
- exit
复制代码
只会强制关闭谷歌浏览器
作者: jyswjjgdwtdtj 时间: 2023-5-31 18:57
- With CreateObject("internetexplorer.application")
- .visible = True
- un = CreateObject("scripting.filesystemobject").opentextfile("1.txt",1).readall
- pw = CreateObject("scripting.filesystemobject").opentextfile("2.txt",1).readall
- For i = 0 To UBound(un)
- .navigate mdste(un,pw)
- Do Until .readystate = 4
- WScript.sleep 100
- Loop
- Next
- End With
- Function mbstr(username,password)
- mbstr = "https://www.dismall.com/member.php?" & _
- "mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&" & _
- "fastloginfield=username&username=" & username & "&password=" & password & "&quickforward=yes&handlekey=ls"
- End Function
复制代码
还可以多开几个
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |