Subject: | Problem getting direct image link |
Error parsing page for direct link. I couldn't contact the Author.
That's why I added this patch.
Subject: | Image-ImageShack-0.03_get_link.patch |
--- lib/Image/ImageShack.pm 2008-08-09 17:05:51.000000000 +0200
+++ /home/fleg/my_scripts/Image-ImageShack-0.03/lib/Image/ImageShack.pm 2009-03-04 20:32:47.000000000 +0100
@@ -251,7 +251,9 @@
if($rsp->is_success){
my $txt = $rsp->content;
- if($txt =~ m{<\s*input\s+[^>]+\s+value\s*=\s*"([^"]+)"[^>]+>\s*</\s*td\s*>\s*<\s*td[^>]*>\s*Direct\s+link\s+to\s+image}ism){
+ #if($txt =~ m{<\s*input\s+[^>]+\s+value\s*=\s*"([^"]+)"[^>]+>\s*</\s*td\s*>\s*<\s*td[^>]*>\s*Direct\s+link\s+to\s+image}ism){
+ # Changed by "Oleg Fiksel" <fleg@lavabit.com>
+ if($txt =~ /Direct.+?href=['"]*([^'"]+)['"]*/ism){
$self->hosted($1);
if($txt =~/thumbnail for/i){
my $uri = $self->hosted();