kzys (owner)

Revisions

gist: 10830 Download_button fork
public
Description:
Because Flickr::API returns gzipped response.
Public Clone URL: git://gist.github.com/10830.git
Diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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]);