- 论坛徽章:
- 6
|
没发现要用到encode的地方...能运行,但是不能生成exe- #!perl64/bin/perl;
- use 5.014;
- use autodie;
- use strict;
- use LWP::Simple qw(get getstore);
- my $content;
- while(1){
- print "Please input website :";
- chomp(my $soure=<STDIN>);
- my $url="http://$soure";
- #my $url = "http://www.qq.com";
- $content = get($url) or die "Couldn't get it!\n";#get source code
- #print $content;
- my @a = split /\r?\n/, $content;
- chomp @a;
- #open CONFIG,'>>:utf8','code.txt';
- #print CONFIG $content;
- #close CONFIG;
- my @img;
- foreach(@a){ #find the url(gif/jpg) from @img
- if(/<img .*?src=\"(.*?(?:(\.gif)|(\.jpg)))\".*?>/){
- push @img,$1;#
- }
- }
- foreach(1..$#img){
- my $url= pop @img;
- state $i++;
- getstore($url,"$i.jpg" ) or die "get picture failed!"; #download picture
- $url=0;
- }
- #print "@img";
- print "Success!GO on?(yes/no):";
- chomp(my $n=<STDIN>);
- if($n=~/yes/i){
- next;
- }else{
- last;
- }
- }
复制代码minirain 发表于 2012-09-14 16:18 ![]()
程序源码及相关文件贴上来,我看看能否解决,好像是 decode问题。 |
|