Skip Menu |

This queue is for tickets about the Image-ImageShack CPAN distribution.

Report information
The Basics
Id: 43846
Status: resolved
Priority: 0/
Queue: Image-ImageShack

People
Owner: plank [...] cpan.org
Requestors: fleg [...] inmail24.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.03
Fixed in: (no value)



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();
From: fleg [...] inmail24.com
Here how you apply the patch: wget 'http://.../Image-ImageShack-0.03.tar.gz' tar xzf Image-ImageShack-0.03.tar.gz cd Image-ImageShack-0.03 wget 'http://.../Image-ImageShack-0.03_get_link.patch' patch -p0 <Image-ImageShack-0.03_get_link.patch ...
On Tue Mar 10 14:39:29 2009, fleg wrote: Show quoted text
> Here how you apply the patch: > > wget 'http://.../Image-ImageShack-0.03.tar.gz' > tar xzf Image-ImageShack-0.03.tar.gz > cd Image-ImageShack-0.03 > wget 'http://.../Image-ImageShack-0.03_get_link.patch' > patch -p0 <Image-ImageShack-0.03_get_link.patch > ...
Than you for the bug report and the patch. I know how to apply a patch in general and this one in particular since it only involves changing a single line. The reason I haven't released a new version yet is that I keep getting an HTTP error while posting the image which results in a croak. Until I am able to get to the bottom of this (apparently I get an 302 FOUND and LWP's is_success returns false) I won't close this ticket since it depends on this new problem.
Fixed in version 0.04