标题: [网络连接] 批处理如何得到形如这样的网址:用户名+.blog.163.com/blog [打印本页]
作者: 我来了 时间: 2013-1-11 13:02 标题: 批处理如何得到形如这样的网址:用户名+.blog.163.com/blog
用GG搜索吧,"*.blog.163.com/blog"
或 这样的 inurl: ( "*.blog.163.com/blog" )
html我不会写啊。用了几个软件垃圾代码太多,搞一会就停止了,不爽啊,所以特来求助下。
用户名+.blog.163.com/blog (或 http://blog.163.com/用户名)
多出来的部分不要
用户名+.blog.163.com/blog/static/130248349201301111405010/
输出*.txt,给软件使用,多谢。
作者: 我来了 时间: 2013-1-11 13:04
能输出给 百八十万的 就够了,再次感谢。
作者: apang 时间: 2013-1-11 15:45
本帖最后由 apang 于 2013-1-11 16:41 编辑
输出30~40条的- Set FSO = CreateObject("Scripting.FileSystemObject")
- Set objXML = CreateObject("Microsoft.XmlHttp")
- For i = 0 To 30 Step 10
- Url = "http://www.google.com.hk/search?q=*.blog.163.com/blog&hl=zh" _
- & "-CN&newwindow=1&safe=strict&gbv=2&prmd=ivns&start=" & i & "&sa=N"
- objXML.Open "Get",Url,False
- objXML.Send()
- Do Until objXML.ReadyState = 4 :Wscript.Sleep 200 :Loop
- Text = objXML.ResponseText
- Str = GetNameStr
- Next
- FSO.OpenTextFile("Result.txt",2,True).Write Str
- CreateObject("Wscript.Shell").Run "NotePad Result.txt"
-
- Function GetNameStr
- Set Re = New RegExp
- Re.Pattern = "http://(.[^/<>]*?\.blog\.163\.com/blog)"
- Re.IgnoreCase = True
- Re.Global = True
- For Each Match in Re.Execute(Text)
- a = Match.SubMatches(0)
- If InStr(LCase(Str),LCase(a)) = 0 Then Str = Str & a & vbCrLf
- Next
- GetNameStr = Str
- End Function
复制代码
作者: 我来了 时间: 2013-1-11 16:23
为什么输出了,这个样子?
yokodan121.blog.163.com/blog
yokodan121.blog.163.com/blog
revotion.blog.163.com/blog
qiezijiang009.blog.163.com/blog
dyestuff.blog.163.com/blog
guangxiliuyuan.blog.163.com/blog
shishusivip.blog.163.com/blog
fon.lowcarbon.blog.163.com/blog
skytangjun.blog.163.com/blog
yokodan121.blog.163.com/blog
yokodan121.blog.163.com/blog
revotion.blog.163.com/blog
qiezijiang009.blog.163.com/blog
dyestuff.blog.163.com/blog
guangxiliuyuan.blog.163.com/blog
shishusivip.blog.163.com/blog
fon.lowcarbon.blog.163.com/blog
skytangjun.blog.163.com/blog
cnlonglzl.blog.163.com/blog
sbpancaifu.blog.163.com/blog
lxc66188.blog.163.com/blog
iphoto.blog.163.com/blog
188189189.blog.163.com/blog
cqly186.blog.163.com/blog
luoyonghao.blog.163.com/blog
122868.blog.163.com/blog
yokodan121.blog.163.com/blog
yokodan121.blog.163.com/blog
revotion.blog.163.com/blog
qiezijiang009.blog.163.com/blog
dyestuff.blog.163.com/blog
guangxiliuyuan.blog.163.com/blog
shishusivip.blog.163.com/blog
fon.lowcarbon.blog.163.com/blog
skytangjun.blog.163.com/blog
yokodan121.blog.163.com/blog
yokodan121.blog.163.com/blog
revotion.blog.163.com/blog
qiezijiang009.blog.163.com/blog
dyestuff.blog.163.com/blog
guangxiliuyuan.blog.163.com/blog
shishusivip.blog.163.com/blog
fon.lowcarbon.blog.163.com/blog
skytangjun.blog.163.com/blog
cnlonglzl.blog.163.com/blog
sbpancaifu.blog.163.com/blog
lxc66188.blog.163.com/blog
iphoto.blog.163.com/blog
188189189.blog.163.com/blog
cqly186.blog.163.com/blog
luoyonghao.blog.163.com/blog
122868.blog.163.com/blog
ssnly100.blog.163.com/blog
tbmhx.blog.163.com/blog
rushuiqingliang.blog.163.com/blog
toujishaoye.blog.163.com/blog
cncasw.blog.163.com/blog
firecacada.blog.163.com/blog
kangbude.blog.163.com/blog
kuanghaifei.blog.163.com/blog
guoanj1.blog.163.com/blog
leezb.blog.163.com/blog
13958079257.blog.163.com/blog
charlie-chao23.blog.163.com/blog
yokodan121.blog.163.com/blog
yokodan121.blog.163.com/blog
revotion.blog.163.com/blog
qiezijiang009.blog.163.com/blog
dyestuff.blog.163.com/blog
guangxiliuyuan.blog.163.com/blog
shishusivip.blog.163.com/blog
fon.lowcarbon.blog.163.com/blog
skytangjun.blog.163.com/blog
yokodan121.blog.163.com/blog
yokodan121.blog.163.com/blog
revotion.blog.163.com/blog
qiezijiang009.blog.163.com/blog
dyestuff.blog.163.com/blog
guangxiliuyuan.blog.163.com/blog
shishusivip.blog.163.com/blog
fon.lowcarbon.blog.163.com/blog
skytangjun.blog.163.com/blog
cnlonglzl.blog.163.com/blog
sbpancaifu.blog.163.com/blog
lxc66188.blog.163.com/blog
iphoto.blog.163.com/blog
188189189.blog.163.com/blog
cqly186.blog.163.com/blog
luoyonghao.blog.163.com/blog
122868.blog.163.com/blog
yokodan121.blog.163.com/blog
yokodan121.blog.163.com/blog
revotion.blog.163.com/blog
qiezijiang009.blog.163.com/blog
dyestuff.blog.163.com/blog
guangxiliuyuan.blog.163.com/blog
shishusivip.blog.163.com/blog
fon.lowcarbon.blog.163.com/blog
skytangjun.blog.163.com/blog
yokodan121.blog.163.com/blog
yokodan121.blog.163.com/blog
revotion.blog.163.com/blog
qiezijiang009.blog.163.com/blog
dyestuff.blog.163.com/blog
guangxiliuyuan.blog.163.com/blog
shishusivip.blog.163.com/blog
fon.lowcarbon.blog.163.com/blog
skytangjun.blog.163.com/blog
cnlonglzl.blog.163.com/blog
sbpancaifu.blog.163.com/blog
lxc66188.blog.163.com/blog
iphoto.blog.163.com/blog
188189189.blog.163.com/blog
cqly186.blog.163.com/blog
luoyonghao.blog.163.com/blog
122868.blog.163.com/blog
ssnly100.blog.163.com/blog
tbmhx.blog.163.com/blog
rushuiqingliang.blog.163.com/blog
toujishaoye.blog.163.com/blog
cncasw.blog.163.com/blog
firecacada.blog.163.com/blog
kangbude.blog.163.com/blog
kuanghaifei.blog.163.com/blog
guoanj1.blog.163.com/blog
leezb.blog.163.com/blog
13958079257.blog.163.com/blog
charlie-chao23.blog.163.com/blog
是不是一次性的输出很多,难度很高,还是服务器有限制?
128行,结果用TEXTPRO删除重复的行之后,能用的就只有29行了。
楼上是好人,大好人一个,可惜还是没给上真气啊~~
作者: apang 时间: 2013-1-11 16:44
回复 4# 我来了
再试试。。。
第3行的数字30可以更改,但你要好几万条,偶不知道怎么弄。。。
作者: 我来了 时间: 2013-1-11 18:13
我有几个不成熟的方法。靠。。。。吐槽一板111K .gif文件都传不上来 弄到了71K的图像说明还是 也传不上来。。。。狂晕
经过一番努力之下,反汇编了三处代码,那个软件成了注册版本,但还有些暗桩,努力下就能存盘了。
作者: batman 时间: 2013-1-11 19:57
本帖最后由 batman 于 2013-1-13 14:55 编辑
这样大规模地搜索,楼主想做什么? 不是想要批量发广告吧?- On Error Resume Next
- Dim HomeUrl, Url
- HomeUrl = "http://www.google.com.hk/search?q=*.blog.163.com/blog&hl=zh-CN&newwindow=1&safe=strict&gbv=2&prmd=ivns&ei=4wLwUNWTO4bhlAXx0IDgBw&start=@#$0&sa=N"
- '自己修改10这个值来决定取多少页的数据
- For i = 1 To 10
- If i = 1 Then
- Url = Replace(HomeUrl, "@#$", "")
- Else
- Url = Replace(HomeUrl, "@#$", i - 1)
- End If
- GetText Url
- Next
- WScript.Echo "ok"
-
- Function GetText(Url)
- Dim objXML
- Set objXML = CreateObject("MSXML2.XmlHttp")
- objXML.open "GET", Url, False
- objXML.send()
- If Err.Number = 0 Then
- Do Until objXML.readyState = 4 : WScript.Sleep 200 : Loop
- GetUrl objXML.responseText
- Else
- Err.Clear
- End If
- Set objXML = Nothing
- End Function
-
- Function GetUrl(Str)
- Dim objEXP, objItems, objItem
- Set objEXP = New RegExp
- objEXP.Global = True
- objEXP.IgnoreCase = True
- objEXP.Pattern = "q=http://([^/<>]+?\.blog\.163\.com)"
- Set objItems = objEXP.Execute(Str)
- For Each objItem In objItems
- WriteText objItem.Submatches(0)
- Next
- GetUrl = objStr
- Set objEXP = Nothing
- End Function
-
- Function WriteText(NewUrl)
- Dim FSO, Ty
- Set FSO = CreateObject("Scripting.Filesystemobject")
- NewUrl = NewUrl & "/blog"
- Ty = 2
- If FSO.FileExists("UrlList.txt") Then Ty = 8
- FSO.OpenTextFile("UrlList.txt", Ty, True).WriteLine NewUrl
- Set FSO = Nothing
- End Function
复制代码
作者: 我来了 时间: 2013-1-13 12:23
回复 7# batman
谢谢版主大人,
我为了提高我博客的访问量
作者: 我来了 时间: 2013-1-13 12:34
为什么 保存成VBS
报错 第44行,缺少标识符
作者: batman 时间: 2013-1-13 14:55
回复 9# 我来了
是Type变量名的问题,已修改
作者: 我来了 时间: 2013-1-13 17:10
为什么 生成的文件找不到呢,
我用filemon在C:\Documents and Settings\Administrator\Cookies
发现若干个[email]administrator@google.com[/email][1].txt
里面只有
PREF
ID=c2549a1f072f7862:FF=2D=zh-CN:NW=1:TM=1358068153:LM=1358068153:S=Qj66rIpCbwYOKJtL
google.com.hk/
1024
2570273408
30420752
3485941808
30274102
*
NID
67=VLqAglJa3-85SghKY13wxc8MxC8Y8JlgBksnU1aRRCAmiZBhQ0Z7oTVKnmByAt1Vl8kMpGI8Qi9jlNILQ2tf86uWxBJwN1bOJIdZb9ELO9zcdAFuRwPJNBi-XSu3_2ZJ
google.com.hk/
9216
4181590656
30310714
3485941808
30274102
*
确实是你的VBS生成的啊,我的系统是XPSP3,难道对系统也有要求?
这次没有报错,找不到生成的文件呢
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |