Skip to content

Instantly share code, notes, and snippets.

@kzys

kzys/gist:10830

Created Sep 15, 2008
Embed
What would you like to do?
Because Flickr::API returns gzipped response.
Index: lib/Plagger/Plugin/CustomFeed/FlickrSearch.pm
===================================================================
--- lib/Plagger/Plugin/CustomFeed/FlickrSearch.pm (revision 2044)
+++ lib/Plagger/Plugin/CustomFeed/FlickrSearch.pm (working copy)
@@ -51,7 +51,7 @@
$context->error("$method failed: $search->{error_text}")
unless $search->{success};
- my $search_doc = $parser->parse_string($search->{_content});
+ my $search_doc = $parser->parse_string($search->decoded_content);
foreach my $search_photo ( $search_doc->findnodes('/rsp/photos/photo') ) {
my $entry = $self->_create_entry($context, $flickr, $parser, $search_photo);
@@ -81,7 +81,7 @@
);
next unless $info->{success};
- my $info_doc = $parser->parse_string($info->{_content});
+ my $info_doc = $parser->parse_string($info->decoded_content);
my $link = $info_doc->findvalue(q[/rsp/photo/urls/url[@type='photopage']]);
my $author = $info_doc->findvalue(q[/rsp/photo/owner/@realname])
|| $info_doc->findvalue(q[/rsp/photo/owner/@username]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.