X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=public_html%2Fcgi-bin%2Fidnes-foto;h=2cd8e7325d1828b9d1b25fa9dfb0647bfd026ef4;hp=6ead9ce247f7ba64ea3fe09f754cfc5ef32eef00;hb=HEAD;hpb=e2bfa49144d1f2f6c39eabf4988c50e4aed1aae0
diff --git a/public_html/cgi-bin/idnes-foto b/public_html/cgi-bin/idnes-foto
index 6ead9ce..2cd8e73 100755
--- a/public_html/cgi-bin/idnes-foto
+++ b/public_html/cgi-bin/idnes-foto
@@ -41,30 +41,7 @@ print <<"EOH";
EOH
-$BASE=~m{^http://\w+\Q.idnes.cz/foto.asp\Ex?[?](?:r=[-_\w]+&c=[-_\w]+|c=[-_\w]+&r=[-_\w]+)$} or $BASE="";
-
-
-my $ua=LWP::UserAgent->new();
-$ua->env_proxy();
-$ua->requests_redirectable([]);
-
-#sub webget($)
-#{
-# my($url)=@_;
-#
-# my $resp=$ua->get($url);
-# if ($resp->is_redirect()) {
-# my $relurl=$resp->header("Location");
-# $relurl=~m{^foto.*[?]} or die;
-# $url=~s{[^/]*$}{};
-# $url.=$relurl;
-# warn "Redirect to: $url\n";
-# $resp=$ua->get($url);
-# }
-# $resp->is_success() or die $url;
-# return $resp->decoded_content();
-#}
-
+$BASE=~m{^http://\w+\Q.idnes.cz/foto.asp?\E(?:r=[-_\w]+&c=[-_\w]+|c=[-_\w]+&r=[-_\w]+)$} or $BASE="";
if ($BASE) {
my $pageno=1;
my %seen;
@@ -73,43 +50,7 @@ PAGES: for (;;) {
my $pageurl=$BASE.'&strana='.$pageno;
my $page=LWP::Simple::get($pageurl) or die $pageurl;
my $did=0;
- my $aspx=0;
- while ($page=~m{"&]*(?:&inframe=1)?)"(?: target="foto-iframe")?>}gi) {
- my $relurl=$1;
- $relurl=~s{&}{&}g;
- my $frameurl=$BASE;
- $frameurl=~s{[?].*}{};
- $frameurl.=$relurl;
- my $frame=LWP::Simple::get($frameurl) or die $frameurl;
- if ($frame=~m{