Author: tpf
Date: Wed Feb  3 22:54:15 2016
New Revision: 2260

URL: http://svn.gna.org/viewcvs/gcstar?rev=2260&view=rev
Log:
° Some adaptations to new layout
° Not finished, still in progress

Modified:
    trunk/gcstar/lib/gcstar/GCPlugins/GCgames/GCJeuxVideoCom.pm

Modified: trunk/gcstar/lib/gcstar/GCPlugins/GCgames/GCJeuxVideoCom.pm
URL: 
http://svn.gna.org/viewcvs/gcstar/trunk/gcstar/lib/gcstar/GCPlugins/GCgames/GCJeuxVideoCom.pm?rev=2260&r1=2259&r2=2260&view=diff
==============================================================================
--- trunk/gcstar/lib/gcstar/GCPlugins/GCgames/GCJeuxVideoCom.pm (original)
+++ trunk/gcstar/lib/gcstar/GCPlugins/GCgames/GCJeuxVideoCom.pm Wed Feb  3 
22:54:15 2016
@@ -2,7 +2,7 @@
 
 ###################################################
 #
-#  Copyright 2005-2015 Tian
+#  Copyright 2005-2016 Tian
 #
 #  This file is part of GCstar.
 #
@@ -52,7 +52,7 @@
     sub loadMultipleResults
     {
         my ($self, $url) = @_;
-        my $page = $self->loadPage($url);
        $page =~ /<div\s+class="bloc-version-dispo">(.*?)<\/div>/s;
+        my $page = $self->loadPage($url);
        $page =~ /<div\s+class="game-top-version-dispo">(.*?)<\/div>/s;
         my $tabs = $1;
         $page =~ /<strong>Sortie\s+France\s+:\s+<\/strong>(.*)/i;
         my $released = $1;
@@ -124,7 +124,6 @@
         }
         elsif ($self->{parsingTips})
         {
-#            if ($attr->{class} eq 'rubrique-asl collapsed')
             if ($attr->{class} eq 'rubrique-asl')
             {
                 $self->{isTip} = 1;
@@ -180,7 +179,7 @@
             }
             elsif ($tagname eq 'div')
             {
-                if ($attr->{class} eq 'titre-meta')
+                if ($attr->{class} eq 'game-top-title')
                 {
                     $self->{is} = 'name';
                 }
@@ -201,7 +200,7 @@
             {
                 if ($self->{is} =~ /screenshot/)
                 {
-                    (my $src = 'http:'.$attr->{src}) =~ s/images-sm/images/;
+                    (my $src = 'http:'.$attr->{'data-srcset'}) =~ 
s/medias-sm/medias/;
                     $self->{curInfo}->{$self->{is}} = $src;
                     if ($self->{is} eq 'screenshot1')
                     {
@@ -279,7 +278,7 @@
                    $origtext =~ s|Nintendo 64|N64|gi;
                    $origtext =~ s|Master system|MS|gi;
                    $origtext =~ s|Game Gear|G.GEAR|gi;
-               if ($origtext =~ /$self->{curInfo}->{platform}/i)
+               if (($origtext =~ /$self->{curInfo}->{platform}/i) || 
($origtext =~ /astuce/i) || ($origtext =~ /renseignement/i) || ($origtext =~ 
/campagne/i))
                    {
                        $self->{isTip} = 2;
                }
@@ -394,6 +393,7 @@
         {
             $html =~ s|<a data-jvcode="HTMLBLOCK" 
href="(.+)">|$self->RecupTips("http://www.jeuxvideo.com/"; . $1)|ge;
             $html =~ s|Chargement du lecteur vid(.)o...|<p>"Une video est 
disponible"</p>|gi;
+            $html =~ s|Partager sur :||gi;
             $html =~ s|<img src="//www.jeuxvideo.com/img/keys/(.+?).gif" 
alt="(.+?)" />|$2|gi;
         }
         else


_______________________________________________
GCstar-commits mailing list
[email protected]
https://mail.gna.org/listinfo/gcstar-commits

Reply via email to