首页 电脑 电脑学堂 查看内容

Bing搜索perl版

2009-8-20 12:09 455 0

摘要: #!/usr/bin/perl use LWP::UserAgent;print "##########################################################...
关键词: nbsp print 0000000000000000 index dork substr check last UserAgent Windows

#!/usr/bin/perl use LWP::UserAgent;print "#########################################################################\n";print "#                           #   #    #     #####  #  ##                 #\n";print "#                          #   #   # #    #   #  # #                    #\n";print "#                         #####  #####   #   #  ##                      #\n";print "#                        #   #  #    #  #   #  # #                      #\n";print "#                       #   #  #     # #####  #  ##                     #\n";print "#                      00000000000000000000000000000000                 #\n";print "#                      WORLD PEACE                                      #\n";print "#                                                                                 #\n";print "#########################################################################\n";print "PLEASE: "; $dork = <STDIN>; chomp($dork); for ($i = 0; $i < 1000; $i += 10) {  $b = LWP::UserAgent->new(agent => 'Mozilla/4.8 [en] (Windows NT 6.0; U)');  $b->timeout(30);  $b->env_proxy;  $c = $b->get('http://www.bing.com/search?q=' . $dork . '&first=' . $i . '&FORM=PERE')->content;  $check = index($c, 'sb_pagN');  while (1) {   $n = index($c, '<h3><a href="');   if ($n == -1) {    last;   }   $c = substr($c, $n + 13);   $s = substr($c, 0, index($c, '"'));   print $s, "\n";  }  if ($check == -1) {   last;  } }  
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部