Wezzul.com - It's the Dinglez
I found that it didn't work for me so I made some change.
[pre]
0a1
> #!/usr/bin/perl
8d8
< #!/usr/bin/perl
46c46,48
<
---
> my $page_count=1;
> if (@link)
> {
48c50,51
< my $page_count = @page_count_pre[0];
---
> $page_count = @page_count_pre[0];
> }
54c57
< $page_count = $page_count / 18;
---
> $page_count = $page_count / 60;
87c90,91
< my @img = $tree->look_down(_tag=>'p', class=>'Photo');
---
> #my @img = $tree->look_down(_tag=>'p', class=>'Photo');
> my @img = $tree->look_down(_tag=>'a', class=>'image_link');
93a98,100
> print "image $i\n";
> print " link ".$img_url->attr('href')."\n";
> print " url $new_url\n";
103,104c110,111
< my @fullImg = $treeT->look_down(_tag=>'div', class=>'photoImgDiv');
<
---
> #my @fullImg = $treeT->look_down(_tag=>'div', class=>'photoImgDiv');
> my @fullImg = $treeT->look_down(_tag=>'img', class=>'reflect');
110,113c117,126
< my $imgID = @fullImg[0]->attr('id');
< $imgID =~ s/photoImgDiv//;
< my $origURL = "http://www.flickr.com/photo_zoom.gne?id=" . $imgID . "&size=o";
<
---
> # my $imgID = @fullImg[0]->attr('id');
> my $imgID = @fullImg[0]->attr('src');
> print "found img $imgID\n";
> $imgID =~ s/.jpg\?v=0/_o.jpg/;
> my $origURL = "$imgID";
> print "generate url $origURL\n";
> $imgID=~ m,.*/([^/] \.jpg)$,;
> $imgID=$1;
> print "storing to ".'images/' . $user_dir . "/" . $imgID ."\n";
> getstore($origURL,'images/' . $user_dir . "/" . $imgID );
118,128c131,141
< my $mechO = WWW::Mechanize->new();
< $mechO->get($origURL);
< my $conO = $mechO->content();
< my $treeO = HTML::TreeBuilder->new_from_content($conO);
< $treeO->parse_file($conO);
<
< my @origImg = $treeO->look_down(_tag=>'p', style=>'font-size: 14px;');
< my @origTree = @fullImg[0]->look_down(_tag=>'img');
< my $origURL = @origTree[0]->attr('src');
< getstore(@origTree[0]->attr('src'), 'images/' . $user_dir . "/" . $imgID . ".jpg");
<
---
> # my $mechO = WWW::Mechanize->new();
> # $mechO->get($origURL);
> # my $conO = $mechO->content();
> # my $treeO = HTML::TreeBuilder->new_from_content($conO);
> # $treeO->parse_file($conO);
> #
> # my @origImg = $treeO->look_down(_tag=>'p', style=>'font-size: 14px;');
> # my @origTree = @fullImg[0]->look_down(_tag=>'img');
> # my $origURL = @origTree[0]->attr('src');
> # getstore(@origTree[0]->attr('src'), 'images/' . $user_dir . "/" . $imgID . ".jpg");
> #
[/pre]
georgeskesseler (at) yahoo (dot) com
Posted by Georges, Saturday, May 12, 4:02pm
[pre]
0a1
> #!/usr/bin/perl
8d8
< #!/usr/bin/perl
46c46,48
<
---
> my $page_count=1;
> if (@link)
> {
48c50,51
< my $page_count = @page_count_pre[0];
---
> $page_count = @page_count_pre[0];
> }
54c57
< $page_count = $page_count / 18;
---
> $page_count = $page_count / 60;
87c90,91
< my @img = $tree->look_down(_tag=>'p', class=>'Photo');
---
> #my @img = $tree->look_down(_tag=>'p', class=>'Photo');
> my @img = $tree->look_down(_tag=>'a', class=>'image_link');
93a98,100
> print "image $i\n";
> print " link ".$img_url->attr('href')."\n";
> print " url $new_url\n";
103,104c110,111
< my @fullImg = $treeT->look_down(_tag=>'div', class=>'photoImgDiv');
<
---
> #my @fullImg = $treeT->look_down(_tag=>'div', class=>'photoImgDiv');
> my @fullImg = $treeT->look_down(_tag=>'img', class=>'reflect');
110,113c117,126
< my $imgID = @fullImg[0]->attr('id');
< $imgID =~ s/photoImgDiv//;
< my $origURL = "http://www.flickr.com/photo_zoom.gne?id=" . $imgID . "&size=o";
<
---
> # my $imgID = @fullImg[0]->attr('id');
> my $imgID = @fullImg[0]->attr('src');
> print "found img $imgID\n";
> $imgID =~ s/.jpg\?v=0/_o.jpg/;
> my $origURL = "$imgID";
> print "generate url $origURL\n";
> $imgID=~ m,.*/([^/] \.jpg)$,;
> $imgID=$1;
> print "storing to ".'images/' . $user_dir . "/" . $imgID ."\n";
> getstore($origURL,'images/' . $user_dir . "/" . $imgID );
118,128c131,141
< my $mechO = WWW::Mechanize->new();
< $mechO->get($origURL);
< my $conO = $mechO->content();
< my $treeO = HTML::TreeBuilder->new_from_content($conO);
< $treeO->parse_file($conO);
<
< my @origImg = $treeO->look_down(_tag=>'p', style=>'font-size: 14px;');
< my @origTree = @fullImg[0]->look_down(_tag=>'img');
< my $origURL = @origTree[0]->attr('src');
< getstore(@origTree[0]->attr('src'), 'images/' . $user_dir . "/" . $imgID . ".jpg");
<
---
> # my $mechO = WWW::Mechanize->new();
> # $mechO->get($origURL);
> # my $conO = $mechO->content();
> # my $treeO = HTML::TreeBuilder->new_from_content($conO);
> # $treeO->parse_file($conO);
> #
> # my @origImg = $treeO->look_down(_tag=>'p', style=>'font-size: 14px;');
> # my @origTree = @fullImg[0]->look_down(_tag=>'img');
> # my $origURL = @origTree[0]->attr('src');
> # getstore(@origTree[0]->attr('src'), 'images/' . $user_dir . "/" . $imgID . ".jpg");
> #
[/pre]
georgeskesseler (at) yahoo (dot) com
Posted by Georges, Saturday, May 12, 4:02pm

Flickr Rippr 1.0.1 Maintenance Release
Download Flickr Rippr 1.0.1 here
Posted on Tuesday, August 29, 9:22pm in Tech by wezzul