Board logo

标题: [网络工具] 集成26个搜索串的批处理 [打印本页]

作者: HoeKey    时间: 2009-2-16 05:56     标题: 集成26个搜索串的批处理

里面有各大网站的搜索串
是用来外部调用的
管理员别封我号就行了
  1. @echo off
  2. set str=%*
  3. if "%1"=="b" goto Baidu
  4. if "%1"=="y" goto yahoo
  5. if "%1"=="w" goto youdao
  6. if "%1"=="s" goto sogou
  7. if "%1"=="so" goto soso
  8. if "%1"=="go" goto gougou
  9. if "%1"=="ku" goto youku
  10. if "%1"=="yi" goto yinyue
  11. if "%1"=="d" goto duote
  12. if "%1"=="di" goto dict
  13. if "%1"=="p" goto chinarank
  14. if "%1"=="yh" goto yyh
  15. if "%1"=="hy" goto hyy
  16. if "%1"=="f" goto kuaiche
  17. if "%1"=="h" goto huajun
  18. if "%1"=="t" goto tiankong
  19. if "%1"=="tb" goto tieba
  20. if "%1"=="zd" goto zhidao
  21. if "%1"=="p3" goto mp3
  22. if "%1"=="tp" goto tupian
  23. if "%1"=="sp" goto shipin
  24. if "%1"=="bk" goto baike
  25. if "%1"=="kj" goto kongjian
  26. if "%1"=="zl" goto ziliao
  27. if "%1"=="xw" goto xinwen
  28. start "" "http://www.google.com/search?hl=zh-CN&ie=GB2312&q=%str:*g =%"
  29. exit /b
  30. :Baidu
  31. start "" "http://www.baidu.com/s?wd=%str:*b =%"
  32. exit /b
  33. :yahoo
  34. start "" "http://one.cn.yahoo.com/s?p=%str:*y =%&pid=hp&v=web"
  35. exit /b
  36. :youdao
  37. start "" "http://www.youdao.com/search?q=%str:*w =%&ue=gbk&keyfrom=163index"
  38. exit /b
  39. :sogou
  40. start "" "http://www.sogou.com/web?query=%str:*s =%"
  41. exit /b
  42. :soso
  43. start "" "http://www.soso.com/q?pid=s.idx&w=%str:*so =%"
  44. exit /b
  45. :gougou
  46. start "" "http://search.gougou.com/search?search=%str:*go =%"
  47. exit /b
  48. :youku
  49. start "" "http://so.youku.com/search_video/q_%str:*ku =%"
  50. exit /b
  51. :yinyue
  52. start "" "http://d.sogou.com/music.so?pf=&query=%str:*yi =%"
  53. exit /b
  54. :duote
  55. start "" "http://www.duote.com/search.php?searchType=&so=%str:*d =%"
  56. exit /b
  57. :dict
  58. start "" "http://www.dict.cn/search?q=%str:*di =%"
  59. exit /b
  60. :chinarank
  61. start "" "http://www.chinarank.org.cn/overview/Info.do?url=%str:*p =%"
  62. exit /b
  63. :yyh
  64. start "" "http://translate.google.cn/translate_t?hl=zh-CN#en|zh-CN|%str:*yh =%"
  65. exit /b
  66. :hyy
  67. start "" "http://translate.google.cn/translate_t#zh-CN|en|%str:*hy =%"
  68. exit /b
  69. :kuaiche
  70. start "" "http://s.kuaiche.com/s/btsearch?q=%str:*f =%&tid=1&type=%E7%94%B5%E5%BD%B1"
  71. exit /b
  72. :huajun
  73. start "" "http://search.newhua.com/search.asp?Keyword=%str:*h =%"
  74. exit /b
  75. :tiankong
  76. start "" "http://www.skycn.com/search.php?ss_name=%str:*t =%&sor=00&sf=default"
  77. exit /b
  78. :tieba
  79. start "" "http://tieba.baidu.com/f?ct=&tn=&rn=&pn=&lm=&kw=%str:*tb =%"
  80. exit /b
  81. :zhidao
  82. start "" "http://zhidao.baidu.com/q?word=%str:*zd =%&ct=17&lm=0&pn=0&tn=ikaslist&rn=10&fr=idx_1"
  83. exit /b
  84. :mp3
  85. start "" "http://mp3.baidu.com/m?f=ms&rn=&tn=baidump3&ct=134217728&word=%str:*p3 =%&lm=-1"
  86. exit /b
  87. :tupian
  88. start "" "http://image.baidu.com/i?ct=201326592&cl=2&lm=-1&tn=baiduimage&pv=&word=%str:*tp =%&z=0"
  89. exit /b
  90. :shipin
  91. start "" "http://video.baidu.com/v?ct=301989888&rn=20&pn=0&db=0&s=0&fbl=1024&word=%str:*sp =%"
  92. exit /b
  93. :baike
  94. start "" "http://baike.baidu.com/list-php/dispose/not_exists.php?word=%str:*bk =%"
  95. exit /b
  96. :kongjian
  97. start "" "http://hi.baidu.com/%str:*kj =%"
  98. exit /b
  99. :ziliao
  100. start "" "http://passport.baidu.com/?business&aid=7&default_tab=2&un=%str:*zl =%"
  101. exit /b
  102. :xinwen
  103. start "" http://news.baidu.com/ns?word=%str:*xw =%&tn=news&from=news&cl=2&rn=20&ct=1
复制代码
g=谷歌
b=百度
y=雅虎
w=有道
s=搜狗
so=搜搜
go=狗狗
ku=优酷
yi=搜狗音乐
d=多特
di=dice海词
p=中国网站排名
yh=谷歌翻译(英译汉)
hy=谷歌翻译(汉译英)
f=快车搜索
h=华军
t=天空
tb=百度贴吧
zd=百度知道
p3=百度mp3
tp=百度图片
sp=百度视频
bk=百度百科
kj=百度空间
zl=百度用户资料
xw=百度新闻
作者: tireless    时间: 2009-2-16 14:28

那些 if 可用一个 for 代替:
  1. @echo off
  2. set str=%*
  3. for %%a in (b y w s so go ku yi d di p yh hy f h t tb zd p3 tp sp bk kj zl xw) do (
  4.   if "%1"=="%%a" goto %%a
  5. )
  6. start "" "http://www.google.com/search?hl=zh-CN&ie=GB2312&q=%str:*g =%"
  7. exit /b
  8. :b 百度
  9. start "" "http://www.baidu.com/s?wd=%str:*b =%"
  10. exit /b
  11. :y 雅虎
  12. start "" "http://one.cn.yahoo.com/s?p=%str:*y =%&pid=hp&v=web"
  13. exit /b
  14. :w 有道
  15. start "" "http://www.youdao.com/search?q=%str:*w =%&ue=gbk&keyfrom=163index"
  16. exit /b
  17. :s 搜狗
  18. start "" "http://www.sogou.com/web?query=%str:*s =%"
  19. exit /b
  20. :so 搜搜
  21. start "" "http://www.soso.com/q?pid=s.idx&w=%str:*so =%"
  22. exit /b
  23. :go 狗狗
  24. start "" "http://search.gougou.com/search?search=%str:*go =%"
  25. exit /b
  26. :ku 优酷
  27. start "" "http://so.youku.com/search_video/q_%str:*ku =%"
  28. exit /b
  29. :yi 搜狗音乐
  30. start "" "http://d.sogou.com/music.so?pf=&query=%str:*yi =%"
  31. exit /b
  32. :d 多特
  33. start "" "http://www.duote.com/search.php?searchType=&so=%str:*d =%"
  34. exit /b
  35. :di dice海词
  36. start "" "http://www.dict.cn/search?q=%str:*di =%"
  37. exit /b
  38. :p 中国网站排名
  39. start "" "http://www.chinarank.org.cn/overview/Info.do?url=%str:*p =%"
  40. exit /b
  41. :yh 谷歌翻译(英译汉)
  42. start "" "http://translate.google.cn/translate_t?hl=zh-CN#en|zh-CN|%str:*yh =%"
  43. exit /b
  44. :hy 谷歌翻译(汉译英)
  45. start "" "http://translate.google.cn/translate_t#zh-CN|en|%str:*hy =%"
  46. exit /b
  47. :f 快车搜索
  48. start "" "http://s.kuaiche.com/s/btsearch?q=%str:*f =%&tid=1&type=%E7%94%B5%E5%BD%B1"
  49. exit /b
  50. :h 华军
  51. start "" "http://search.newhua.com/search.asp?Keyword=%str:*h =%"
  52. exit /b
  53. :t 天空
  54. start "" "http://www.skycn.com/search.php?ss_name=%str:*t =%&sor=00&sf=default"
  55. exit /b
  56. :tb 百度贴吧
  57. start "" "http://tieba.baidu.com/f?ct=&tn=&rn=&pn=&lm=&kw=%str:*tb =%"
  58. exit /b
  59. :zd 百度知道
  60. start "" "http://zhidao.baidu.com/q?word=%str:*zd =%&ct=17&lm=0&pn=0&tn=ikaslist&rn=10&fr=idx_1"
  61. exit /b
  62. :p3 百度mp3
  63. start "" "http://mp3.baidu.com/m?f=ms&rn=&tn=baidump3&ct=134217728&word=%str:*p3 =%&lm=-1"
  64. exit /b
  65. :tp 百度图片
  66. start "" "http://image.baidu.com/i?ct=201326592&cl=2&lm=-1&tn=baiduimage&pv=&word=%str:*tp =%&z=0"
  67. exit /b
  68. :sp 百度视频
  69. start "" "http://video.baidu.com/v?ct=301989888&rn=20&pn=0&db=0&s=0&fbl=1024&word=%str:*sp =%"
  70. exit /b
  71. :bk 百度百科
  72. start "" "http://baike.baidu.com/list-php/dispose/not_exists.php?word=%str:*bk =%"
  73. exit /b
  74. :kj 百度空间
  75. start "" "http://hi.baidu.com/%str:*kj =%"
  76. exit /b
  77. :zl 百度用户资料
  78. start "" "http://passport.baidu.com/?business&aid=7&default_tab=2&un=%str:*zl =%"
  79. exit /b
  80. :xw 百度新闻
  81. start "" "http://news.baidu.com/ns?word=%str:*xw =%&tn=news&from=news&cl=2&rn=20&ct=1"
复制代码

作者: HoeKey    时间: 2009-2-16 14:41

呵呵  还是你厉害啊
作者: 随风    时间: 2009-2-16 21:19

何必要for呢 直接
@echo off
set str=%*
goto %~1
不行吗?
作者: tireless    时间: 2009-2-16 21:29     标题: 回复 4楼 的帖子

行,如果不考虑 不输入搜索引擎别名 的情况下。那个代码考虑了 不输入搜索引擎别名 时,默认进行Google搜索。
作者: conglin58    时间: 2022-8-16 16:30

N久没来了!没想到论坛还在!不容易!




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2