备份flickr照片集
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了备份flickr照片集相关的知识,希望对你有一定的参考价值。
#!/usr/bin/perl -w # To install the Flickr perl library on OSX with macports I do: # sudo port install p5-flickr-api # On Linux there's a similar package. # # Then to get Flickr::Photoset I do: # sudo perl -MCPAN -e 'install Flickr::Photoset' use Data::Dumper; use Flickr::Photoset; use Flickr::Photo; use LWP::Simple; use strict; my $params = { api_key => 'your api key'}; my $info = {}; my $photoset = Flickr::Photoset->new($params); # specify a photoset if ($photoset->id({id => '72057594072478931'})) { my $title = $photoset->title; my $owner = $photoset->owner->real_name; my $photos = $photoset->photos; foreach my $p ( @$photos ) { my $id = $p->id; my $sizes = $p->sizes; foreach my $s (@$sizes) { if ( $s->{'label'} eq 'Original') { $info->{$id} = { source => $s->{'source'}, title => $p->title, server => $p->server }; my $ret = getstore( $s->{'source'}, $p->title.'_'.$id.'.jpg' ); } } } }
以上是关于备份flickr照片集的主要内容,如果未能解决你的问题,请参考以下文章
如何在 Flickr 上找到又酷,又有趣,且版权自由的照片?