aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomáš Čech <sleep_walker@suse.cz>2013-04-03 00:58:46 +0200
committerTomáš Čech <sleep_walker@suse.cz>2013-04-03 01:06:25 +0200
commit128e6647c4be4750bcd75930179485b0ea0f88b8 (patch)
tree855e7ee5d7da06d4c8405ab998536a06478f5d27
parent74b0f6f18e68eaf5428d2a70b9ff72baac05a06f (diff)
downloadget-flash-videos-128e6647c4be4750bcd75930179485b0ea0f88b8.tar.gz
decode HTML entities in URL if iframe needs it
-rw-r--r--lib/FlashVideo/Generic.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/FlashVideo/Generic.pm b/lib/FlashVideo/Generic.pm
index a3b0e49..1625df4 100644
--- a/lib/FlashVideo/Generic.pm
+++ b/lib/FlashVideo/Generic.pm
@@ -6,6 +6,7 @@ use FlashVideo::Utils;
use URI;
use FlashVideo::URLFinder;
use URI::Escape qw(uri_unescape);
+use HTML::Entities qw(decode_entities);
my $video_re = qr!http[-:/a-z0-9%_.?=&]+@{[EXTENSIONS]}
# Grab any params that might be used for auth..
@@ -71,6 +72,7 @@ sub find_video {
if(!$actual_url) {
for my $iframe($browser->content =~ /<iframe[^>]+src=["']?([^"'>]+)/gi) {
$iframe = URI->new_abs($iframe, $browser->uri);
+ $iframe = decode_entities($iframe);
debug "Found iframe: $iframe";
my $sub_browser = $browser->clone;
$sub_browser->get($iframe);