- # Look for the title
- if ($p->get_tag('title')) {
- $metadata->{'TITLE'} = $p->get_text();
- $metadata->{'TITLE'} =~ s/^The Escapist : Zero Punctuation: (.*)$/$1/im;
+ while ($e = $p->get_tag('div', 'param')) {
+ if (($e->[0] eq 'param') and exists($e->[1]->{name}) and ($e->[1]->{name} eq 'flashvars')) {
+ my %r = map { $self->decode_hexurl($_) } split(/[&=]/, $e->[1]->{value});
+
+ unless(exists($r{config})) {
+ $self->error("config URL not found in flashvars");
+ return undef;
+ }
+
+ $j = $r{config};
+ } elsif (($e->[0] eq 'div') and exists($e->[1]->{itemprop}) and ($e->[1]->{itemprop} eq 'name')) {
+ $metadata->{'TITLE'} = $p->get_phrase();
+ }