[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[网络连接] 批处理如何得到形如这样的网址:用户名+.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,给软件使用,多谢。

能输出给 百八十万的 就够了,再次感谢。

TOP

本帖最后由 apang 于 2013-1-11 16:41 编辑

输出30~40条的
  1. Set FSO = CreateObject("Scripting.FileSystemObject")
  2. Set objXML = CreateObject("Microsoft.XmlHttp")
  3. For i = 0 To 30 Step 10
  4.    Url = "http://www.google.com.hk/search?q=*.blog.163.com/blog&hl=zh" _
  5.    & "-CN&newwindow=1&safe=strict&gbv=2&prmd=ivns&start=" & i & "&sa=N"
  6.    objXML.Open "Get",Url,False
  7.    objXML.Send()
  8.    Do Until objXML.ReadyState = 4 :Wscript.Sleep 200 :Loop
  9.    Text = objXML.ResponseText
  10.    Str = GetNameStr
  11. Next
  12. FSO.OpenTextFile("Result.txt",2,True).Write Str
  13. CreateObject("Wscript.Shell").Run "NotePad Result.txt"
  14. Function GetNameStr
  15.    Set Re = New RegExp
  16.    Re.Pattern = "http://(.[^/<>]*?\.blog\.163\.com/blog)"
  17.    Re.IgnoreCase = True
  18.    Re.Global = True
  19.    For Each Match in Re.Execute(Text)
  20.       a = Match.SubMatches(0)
  21.       If InStr(LCase(Str),LCase(a)) = 0 Then Str = Str & a & vbCrLf
  22.    Next
  23.    GetNameStr = Str
  24. End Function
复制代码

TOP

为什么输出了,这个样子?

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行了。
楼上是好人,大好人一个,可惜还是没给上真气啊~~

TOP

回复 4# 我来了

再试试。。。
第3行的数字30可以更改,但你要好几万条,偶不知道怎么弄。。。

TOP

我有几个不成熟的方法。靠。。。。吐槽一板111K .gif文件都传不上来 弄到了71K的图像说明还是 也传不上来。。。。狂晕

经过一番努力之下,反汇编了三处代码,那个软件成了注册版本,但还有些暗桩,努力下就能存盘了。

TOP

本帖最后由 batman 于 2013-1-13 14:55 编辑

这样大规模地搜索,楼主想做什么? 不是想要批量发广告吧?
  1. On Error Resume Next
  2. Dim HomeUrl, Url
  3. 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"
  4. '自己修改10这个值来决定取多少页的数据
  5. For i = 1 To 10
  6.   If i = 1 Then
  7.     Url = Replace(HomeUrl, "@#$", "")
  8.     Else
  9.     Url = Replace(HomeUrl, "@#$", i - 1)
  10.   End If
  11.   GetText Url
  12. Next
  13. WScript.Echo "ok"
  14. Function GetText(Url)
  15.   Dim objXML
  16.   Set objXML = CreateObject("MSXML2.XmlHttp")
  17.   objXML.open "GET", Url, False
  18.   objXML.send()
  19.   If Err.Number = 0 Then
  20.     Do Until objXML.readyState = 4 : WScript.Sleep 200 : Loop
  21.     GetUrl objXML.responseText
  22.     Else
  23.     Err.Clear
  24.   End If
  25.   Set objXML = Nothing
  26. End Function
  27. Function GetUrl(Str)
  28.   Dim objEXP, objItems, objItem
  29.   Set objEXP = New RegExp
  30.   objEXP.Global = True
  31.   objEXP.IgnoreCase = True
  32.   objEXP.Pattern = "q=http://([^/<>]+?\.blog\.163\.com)"
  33.   Set objItems = objEXP.Execute(Str)
  34.   For Each objItem In objItems
  35.     WriteText objItem.Submatches(0)
  36.   Next
  37.   GetUrl = objStr
  38.   Set objEXP = Nothing
  39. End Function
  40. Function WriteText(NewUrl)
  41.   Dim FSO, Ty
  42.   Set FSO = CreateObject("Scripting.Filesystemobject")
  43.   NewUrl = NewUrl & "/blog"
  44.   Ty = 2
  45.   If FSO.FileExists("UrlList.txt") Then Ty = 8
  46.   FSO.OpenTextFile("UrlList.txt", Ty, True).WriteLine NewUrl
  47.   Set FSO = Nothing  
  48. End Function
复制代码
***共同提高***

TOP

回复 7# batman

谢谢版主大人,
我为了提高我博客的访问量

TOP

为什么 保存成VBS
报错 第44行,缺少标识符

TOP

回复 9# 我来了


    是Type变量名的问题,已修改
***共同提高***

TOP

为什么 生成的文件找不到呢,
我用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,难道对系统也有要求?
这次没有报错,找不到生成的文件呢

TOP

返回列表