aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomáš Čech <sleep_walker@suse.cz>2013-04-03 01:04:10 +0200
committerTomáš Čech <sleep_walker@suse.cz>2013-04-03 01:06:32 +0200
commit984fee4d9b140365b9ec56f39382236a1affb814 (patch)
treea1bf613f69259c9a10aac3b2e8a218377a520b49
parent128e6647c4be4750bcd75930179485b0ea0f88b8 (diff)
downloadget-flash-videos-984fee4d9b140365b9ec56f39382236a1affb814.tar.gz
remove decoding HTML entities from Vk.com code, simplify the code
-rw-r--r--lib/FlashVideo/Site/Vk.pm17
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/FlashVideo/Site/Vk.pm b/lib/FlashVideo/Site/Vk.pm
index b2a731f..04e621a 100644
--- a/lib/FlashVideo/Site/Vk.pm
+++ b/lib/FlashVideo/Site/Vk.pm
@@ -16,28 +16,13 @@ sub find_video {
my $uid = "";
my $vtag = "";
my $url = "";
- my $reget = 0;
-
- $new_embed_url = decode_entities($embed_url);
-
- # if the URL contains undecoded HTML entities, we have the wrong URL
- # and need to get proper one
- if ($embed_url ne $new_embed_url) {
- info ("URI with encoded entities... re-GETing");
- $embed_url = $new_embed_url;
- $reget = 1;
- }
# vkontakte.ru is the same page as vk.com, but it redirects to login (?)
if ($embed_url =~ /http:\/\/vkontakte.ru\//) {
$embed_url =~ s/http:\/\/vkontakte.ru\//http:\/\/vk.com\//;
- $reget = 1;
- }
-
- # in either of case above let's get the page again with changed URL
- if ($reget) {
$browser->get($embed_url);
}
+
debug ("URI: " . $embed_url);
if ($browser->content =~ /\s*var video_title = '([^']+)';/) {