Perl使用Tesseract-OCR实现验证码识别教程(prescott微生物学pdf)这都可以

随心笔谈2年前发布 编辑
186 0
🌐 经济型:买域名、轻量云服务器、用途:游戏 网站等 《腾讯云》特点:特价机便宜 适合初学者用 点我优惠购买
🚀 拓展型:买域名、轻量云服务器、用途:游戏 网站等 《阿里云》特点:中档服务器便宜 域名备案事多 点我优惠购买
🛡️ 稳定型:买域名、轻量云服务器、用途:游戏 网站等 《西部数码》 特点:比上两家略贵但是稳定性超好事也少 点我优惠购买

use strict;

our $url   =$ARGV[0];

our $file  =$ARGV[1];

my $res=undef;

my @tmp=undef;

my @pxy=undef;

    `wget $url -q -O ___html`;

    open FH, “<___html”;

    @tmp=;

    close FH;

    $res=join(”,@tmp);

    undef(@tmp);

    `del ___html /s /q`;

@tmp=( $res=~ /]+)>(\d+)’http://www.proxyfire.net’.$tmp[$i], ‘port’=>$tmp[$i+1]};

    $i=$i + 1;

}

for (my $i=0; $i < @pxy; $i++) {     if( length(${$pxy[$i]}{ip})>0 )

    {

        `echo off & wget ${$pxy[$i]}{ip} -q -O ___png`;

        `tesseract ___png ___ -l chi_tra`;

        my $txt=undef;  

        open FH,”<___.txt”;

        $txt=;

        close FH;

        if ( length($txt)>11 )

        {

            $txt=~ s/\s+//g;

            $txt=~ s/日/8/g;

            $txt=~ s/昍/88/g;

            $txt=~ s/s0/60/g;

            $txt=~ s/s1/61/g;

            $txt=~ s/s2/62/g;

            $txt=~ s/s3/69/g;

            $txt=~ s/s4/64/g;

            $txt=~ s/s5/65/g;

            $txt=~ s/s7/67/g;

            $txt=~ s/s8/68/g;

            $txt=~ s/s9/69/g;

            $txt=~ s/0s/06/g;

            $txt=~ s/1s/16/g;

            $txt=~ s/2s/26/g;

            $txt=~ s/3s/96/g;

            $txt=~ s/4s/46/g;

            $txt=~ s/5s/56/g;

            $txt=~ s/6s/66/g;

            $txt=~ s/7s/76/g;

            $txt=~ s/8s/86/g;

            $txt=~ s/9s/96/g;

            $txt=~ s/ss/66/g;

            $txt=~ s/\.s/\.6/g;

            ${$pxy[$i]}{ip}=$txt;

            my $bak1=$txt;

            my $bak2=$txt;

            $bak1=~ s/13/19/g;

            $bak1=~ s/\.32\https://www.jb51.net/article/\.92\https://www.jb51.net/article/g;

            $bak1=~ s/\.33\https://www.jb51.net/article/\.99\https://www.jb51.net/article/g;

            $bak2=~ s/19/13/g;

            $bak2=~ s/\.243/\.249/g;

            $bak2=~ s/203\https://www.jb51.net/article/209\https://www.jb51.net/article/g;

            open FHX,”>>$file”;

            print FHX ${$pxy[$i]}{ip}.”:”.${$pxy[$i]}{port}.”\n”;

            print FHX $bak1.”:”.${$pxy[$i]}{port}.”\n”;

            print FHX $bak2.”:”.${$pxy[$i]}{port}.”\n”;

            close FHX;

        }

        my $txt=undef;

    }

}

`del ___* /s /q`;

undef($url);

undef($file);

undef($res);

undef(@tmp);

undef(@pxy);

© 版权声明

相关文章