Author: tpf
Date: Tue Jul 5 18:18:52 2016
New Revision: 2286
URL: http://svn.gna.org/viewcvs/gcstar?rev=2286&view=rev
Log:
° Problem with https => replace with picture in http
Modified:
trunk/gcstar/lib/gcstar/GCPlugins/GCboardgames/GCtrictrac.pm
Modified: trunk/gcstar/lib/gcstar/GCPlugins/GCboardgames/GCtrictrac.pm
URL:
http://svn.gna.org/viewcvs/gcstar/trunk/gcstar/lib/gcstar/GCPlugins/GCboardgames/GCtrictrac.pm?rev=2286&r1=2285&r2=2286&view=diff
==============================================================================
--- trunk/gcstar/lib/gcstar/GCPlugins/GCboardgames/GCtrictrac.pm
(original)
+++ trunk/gcstar/lib/gcstar/GCPlugins/GCboardgames/GCtrictrac.pm Tue Jul
5 18:18:52 2016
@@ -86,6 +86,7 @@
{
$self->{curInfo}->{name} = $attr->{alt};
$self->{curInfo}->{boxpic} = $attr->{src};
+ $self->{curInfo}->{boxpic} =~ s/https/http/g;
}
elsif (($tagname eq "a") && ($attr->{class} eq "prop-link"))
{
@@ -155,6 +156,7 @@
{
my $found = 0;
+ my $found1 = 0;
my $picture = "";
my $page = $self->loadPage($attr->{href});
$found = index($page,"<section class=\"photos\"
id=\"media-library\">");
@@ -163,22 +165,29 @@
$page =~ s/&/&/g;
while ($page =~ /<a href="(.*?)"\s+title="(.*?)"
data-reveal-id="mediaModal" data-reveal-ajax="true">/s )
{
- $picture = $1;
+ $picture = $self->loadPage($1);
+ $found1 = index($picture,"src=\"");
+ $picture = substr($picture, $found1
+length('src="'),length($picture)- $found1 -length('src="'));
+ $picture = substr($picture, 0,index($picture,"\""));
if ($self->{curInfo}->{photo1} eq "" )
{
$self->{curInfo}->{photo1} = $picture;
+ $self->{curInfo}->{photo1} =~ s/https/http/g;
}
elsif ($self->{curInfo}->{photo2} eq "" )
{
$self->{curInfo}->{photo2} = $picture;
+ $self->{curInfo}->{photo2} =~ s/https/http/g;
}
elsif ($self->{curInfo}->{photo3} eq "" )
{
$self->{curInfo}->{photo3} = $picture;
+ $self->{curInfo}->{photo3} =~ s/https/http/g;
}
elsif ($self->{curInfo}->{photo4} eq "" )
{
$self->{curInfo}->{photo4} = $picture;
+ $self->{curInfo}->{photo4} =~ s/https/http/g;
}
$found = index($page,"data-reveal-id=\"mediaModal\"
data-reveal-ajax=\"true\">");
$page = substr($page, $found
+length('data-reveal-id="mediaModal" data-reveal-ajax="true">'),length($page)-
$found -length('data-reveal-id="mediaModal" data-reveal-ajax="true">'));
_______________________________________________
GCstar-commits mailing list
[email protected]
https://mail.gna.org/listinfo/gcstar-commits