Author: tian
Date: Fri Jan 23 20:50:09 2015
New Revision: 2257
URL: http://svn.gna.org/viewcvs/gcstar?rev=2257&view=rev
Log:
Patch from user
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=2257&r1=2256&r2=2257&view=diff
==============================================================================
--- trunk/gcstar/lib/gcstar/GCPlugins/GCgames/GCJeuxVideoCom.pm (original)
+++ trunk/gcstar/lib/gcstar/GCPlugins/GCgames/GCJeuxVideoCom.pm Fri Jan 23
20:50:09 2015
@@ -36,7 +36,7 @@
{
my ($self, $src) = @_;
my $n = '0A12B34C56D78E9F';
- my $res = 'http://www.jeuxvideo.com/';
+ my $res = 'http://www.jeuxvideo.com';
my $s = reverse $src;
my ($c, $l);
while (length $s)
@@ -52,13 +52,13 @@
sub loadMultipleResults
{
my ($self, $url) = @_;
- my $page = $self->loadPage($url);
- $page =~ /<div\s+class="bloc-onglet-machine">(.*?)<\/div>/s;
+ my $page = $self->loadPage($url);
$page =~ /<div\s+class="bloc-version-dispo">(.*?)<\/div>/s;
my $tabs = $1;
$page =~ /<strong>Sortie\s+France\s+:\s+<\/strong>(.*)/i;
my $released = $1;
- $page =~ /<meta property="og:title" content="(.*?)">/;
- my $name = $1;
+ $page =~ /<h1\s+class="highlight">(.*?)<\/h1>/i;
+ my $name = $1;
+ $name =~ s/'/'/g;
my @lines = split /\n/, $tabs;
foreach my $line (@lines)
{
@@ -67,7 +67,7 @@
my $url = $1;
my $platform = $2;
$self->{itemIdx}++;
- $self->{itemsList}[$self->{itemIdx}]->{url} =
'http://www.jeuxvideo.com'.$url;
+ $self->{itemsList}[$self->{itemIdx}]->{url} =
'http://www.jeuxvideo.com/'.$url;
$self->{itemsList}[$self->{itemIdx}]->{name} = $name;
$self->{itemsList}[$self->{itemIdx}]->{platform} = $platform;
$self->{itemsList}[$self->{itemIdx}]->{released} = $released;
@@ -92,6 +92,7 @@
{
#If it ends with a /, it means it's a
multi-platform game, and the link points to a common page
$self->loadMultipleResults($url);
+ $self->{urls}->{$url} =
1;
}
else
{
_______________________________________________
GCstar-commits mailing list
[email protected]
https://mail.gna.org/listinfo/gcstar-commits