reagent-snip-snap 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ spec = Gem::Specification.new do |s|
14
14
  s.author = 'Patrick Reagan'
15
15
  s.email = 'reaganpr@gmail.com'
16
16
  s.homepage = 'http://sneaq.net'
17
- s.files = %w(README.rdoc Rakefile) + Dir.glob("{lib,test}/**/*")
17
+ s.files = %w(README.rdoc Rakefile) + Dir.glob("{lib,test}/**/*") - ['test/flickr_api_key']
18
18
  # s.executables = ['snip-snap']
19
19
 
20
20
  s.add_dependency('curb', '>= 0.5.1.0')
@@ -27,7 +27,13 @@ end
27
27
 
28
28
  Rake::TestTask.new do |t|
29
29
  t.libs << 'test'
30
- t.test_files = FileList["test/**/*_test.rb"]
30
+ t.test_files = FileList["test/unit/**/*_test.rb"]
31
+ t.verbose = true
32
+ end
33
+
34
+ Rake::TestTask.new(:integration) do |t|
35
+ t.libs << 'test'
36
+ t.test_files = FileList["test/integration/*_test.rb"]
31
37
  t.verbose = true
32
38
  end
33
39
 
@@ -36,7 +42,7 @@ begin
36
42
 
37
43
  Rcov::RcovTask.new(:coverage) do |t|
38
44
  t.libs = ['test']
39
- t.test_files = FileList["test/**/*_test.rb"]
45
+ t.test_files = FileList["test/unit/**/*_test.rb"]
40
46
  t.verbose = true
41
47
  t.rcov_opts = ['--text-report', "-x #{Gem.path}", '-x /Library/Ruby', '-x /usr/lib/ruby']
42
48
  end
data/lib/snip_snap.rb CHANGED
@@ -38,11 +38,11 @@ module SnipSnap
38
38
 
39
39
  def self.host_map # :nodoc:
40
40
  {
41
- 'Skitch' => ['skitch.com'],
42
- 'Imgly' => ['img.ly'],
43
- 'Twitpic' => ['twitpic.com'],
44
- 'Yfrog' => ['yfrog.com', 'yfrog.us'],
45
- 'Flickr' => ['flic.kr']
41
+ /^(www\.)?skitch.com/ => 'Skitch',
42
+ /img.ly\/[0-9a-z]+$/i => 'Imgly',
43
+ /^twitpic.com/ => 'Twitpic',
44
+ /yfrog\.(com|us)/ => 'Yfrog',
45
+ /^(flic.kr|(www\.)?flickr.com)/ => 'Flickr'
46
46
  }
47
47
  end
48
48
 
@@ -52,10 +52,12 @@ module SnipSnap
52
52
  end
53
53
 
54
54
  def self.class_name_for(url) # :nodoc:
55
- uri = URI.parse(url)
56
- match = host_map.detect {|k,v| v.include?(uri.host) }
55
+ uri = URI.parse(url)
56
+ subject = "#{uri.host}#{uri.path}"
57
57
 
58
- match.nil? ? 'Image' : match[0]
58
+ match = host_map.detect {|k,v| Regexp.new(k) =~ subject }
59
+
60
+ match.nil? ? 'Image' : match[1]
59
61
  end
60
62
 
61
63
  # Set the Flickr API key for use by the underlying Flickr API library
@@ -13,7 +13,7 @@ module SnipSnap
13
13
  end
14
14
 
15
15
  def extension
16
- uri = URI.parse(url)
16
+ uri = URI.parse(response.last_effective_url)
17
17
  extension = File.extname(uri.path).sub(/./, '')
18
18
 
19
19
  extension unless extension == ''
@@ -24,7 +24,7 @@ module SnipSnap
24
24
  end
25
25
 
26
26
  def image_url
27
- url if image?
27
+ response.last_effective_url if image?
28
28
  end
29
29
 
30
30
  end
@@ -4,14 +4,13 @@ module SnipSnap
4
4
  include Client
5
5
 
6
6
  request_method :head
7
-
8
- def url
9
- identifier = @url.match(/([^\/]+)$/)[1]
10
- "http://twitpic.com/show/large/#{identifier}"
7
+
8
+ def identifier
9
+ url.match(/([^\/]+)$/)[1]
11
10
  end
12
11
 
13
12
  def image_url
14
- response.last_effective_url
13
+ "http://twitpic.com/show/large/#{identifier}"
15
14
  end
16
15
 
17
16
  end
@@ -3,7 +3,7 @@ module SnipSnap
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- TINY = 2
6
+ TINY = 3
7
7
 
8
8
  def self.to_s # :nodoc:
9
9
  [MAJOR, MINOR, TINY].join('.')
@@ -5,14 +5,9 @@ module SnipSnap
5
5
 
6
6
  request_method :get
7
7
 
8
- def url
9
- identifier = @url.match(/([^\/]+)$/)[1]
10
- "http://yfrog.com/api/xmlInfo?path=#{identifier}"
11
- end
12
-
13
8
  def image_url
14
9
  body = response.body_str
15
- body.match(/<image_link>(.+)<\/image_link>/)[1]
10
+ body.match(/<link rel="image_src" href="(.+)" \/>/)[1]
16
11
  end
17
12
 
18
13
  end
@@ -0,0 +1,719 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5
+ <title>Yfrog - b97 - Uploaded by urbanflex</title>
6
+ <meta name="copyright" content="Copyright 2009 ImageShack"/>
7
+ <!-- <meta name="description" content="ImageShack"/> -->
8
+
9
+ <meta name="medium" content="image"/>
10
+ <meta name="title" content="Yfrog - b97" />
11
+ <meta name="description" content="YFrog - Share your images and videos on Twitter!" />
12
+ <meta name="revisit-after" content="1 days">
13
+ <meta name="keywords" content="free image hosting, free video hosting, image hosting, video hosting, photo image hosting site, video hosting site"/>
14
+ <meta name="robots" content="index,follow">
15
+ <meta name="summary" content="Image with b97" />
16
+ <link rel="image_src" href="http://img377.yfrog.com/img377/9665/b97.jpg" />
17
+
18
+ <link rel="target_url" href="http://img377.yfrog.com/i/b97.jpg/" />
19
+
20
+ <meta name="keywords" content="Yfrog, Posting to Twitter.com, Twitter, free image hosting, Tweet, free video hosting, image hosting, video hosting, photo image hosting site, video hosting site"/>
21
+ <meta name="robots" content="index,follow"/>
22
+ <link href="/css/yfrog.css" rel="stylesheet" type="text/css"/>
23
+ <link type="application/rss+xml" href="http://img377.yfrog.com/img377/9665/b97.jpg.comments.xml" title="RSS" rel="alternate"/>
24
+
25
+ <script type="text/javascript">
26
+ var currentTime = new Date();
27
+ var rstart = currentTime.getTime();
28
+ var start = 0;
29
+ var short_url = "http://img377.yfrog.com/i/b97.jpg/";
30
+ var short_path = "img377/9665/b97.jpg";
31
+
32
+ </script>
33
+
34
+ <!-- Start Google Analytics Tag -->
35
+
36
+ <script type="text/javascript">
37
+ var url_image_path = 'img377/9665/b97.jpg';
38
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
39
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
40
+ </script>
41
+
42
+ <script type="text/javascript">
43
+ var pageTracker = _gat._getTracker("UA-6232220-2");
44
+ pageTracker._initData();
45
+ pageTracker._setDomainName(".yfrog.com");
46
+ if (url_image_path.length > 0)
47
+ pageTracker._trackPageview(url_image_path);
48
+ else
49
+ pageTracker._trackPageview();
50
+ </script>
51
+
52
+
53
+ <!-- End Google Analytics tag -->
54
+
55
+ <script type="text/javascript">pageTracker._setVar('MyPage.YF');</script>
56
+
57
+
58
+ <script type="text/javascript">pageTracker._trackEvent('image_break_out','no_username', 'img377/9665/b97.jpg' );</script>
59
+
60
+
61
+
62
+ <!-- End Google Analytics tag -->
63
+ <!-- Start Quantcast tag -->
64
+
65
+ <script type="text/javascript">
66
+ _qoptions={
67
+ qacct:"p-65DrxcUXjcWq6"
68
+ };
69
+ </script>
70
+ <script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
71
+ <noscript>
72
+ <img src="http://pixel.quantserve.com/pixel/p-65DrxcUXjcWq6.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/>
73
+ </noscript>
74
+ <!-- End Quantcast tag -->
75
+ </head>
76
+
77
+ <body >
78
+
79
+
80
+ <div class="main_head">
81
+ <div class="layout">
82
+
83
+ <div class="indent" >
84
+
85
+ <div id="top" style="background:#e0f0e5;width:1011px;">
86
+ <div style="background:#e0f0e5;width:1005px;;text-align:right;padding:0px;"><a href="http://yfrog.com/froggy_login.php"><img border="0" alt="Login to Twitter" src="/images/sign-in-twitter.png"/></a></div>
87
+ <div class="top_form right">
88
+
89
+ <!--
90
+ <div id="signOut" class="signOut">
91
+ <a href="javascript:;" id="btnlogin">Sign In</a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://my.imageshack.us/registration">Sign Up</a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://my.imageshack.us/registration/passwordrecovery.php">forgot pass?</a>
92
+ </div>
93
+ -->
94
+
95
+ <div class="left">
96
+ <form name="langForm" id="langForm" action="" method="post">
97
+ <select class="lang" id="language" name="language">
98
+ <option value="en" selected="selected">English</option>
99
+
100
+ <option value="ru">Русский</option>
101
+ </select>
102
+ </form>
103
+ </div>
104
+ <!-- Search -->
105
+ <div class="search right">
106
+ <form method="get" action="http://yfrog.com/search.php" id="searchform" name="searchform" onSubmit="pageTracker._trackEvent('tfrog-click','search_submit'); ">
107
+ <input name="s" id="searchfield" size="28" value=""/>&nbsp;&nbsp;<a id="searchbutton" href="javascript:;" onclick="document.searchform.submit();" >Search</a>
108
+ </form>
109
+
110
+
111
+
112
+ </div>
113
+ </div>
114
+ <div class="logo"><h1><a href="http://yfrog.com/">ImageShack</a></h1></div>
115
+ <div class="clear"></div>
116
+ </div>
117
+
118
+
119
+ <!-- Main Menu -->
120
+ <div id="menu" style="background:#e0f0e5;float:left;width:1021px;">
121
+ <ul class="sf-menu" style="background:#e0f0e5;">
122
+ <li><a href="http://yfrog.com/">Upload</a></li>
123
+
124
+ <li><a href="http://yfrog.com/froggy.php">My Yfrog</a></li>
125
+ </ul>
126
+ </div>
127
+
128
+ <div class="clear"></div>
129
+ </div><div class="main_body">
130
+ <div class="column-left">
131
+
132
+
133
+
134
+ <!-- Actions Info Div -->
135
+ <div class="action-div">
136
+ <div id="action-share">
137
+
138
+ </div>
139
+ </div>
140
+
141
+ <!-- Main Image -->
142
+ <div id="main" >
143
+ <div style="cursor:pointer;" onclick="window.open(href='/img377/9665/b97.jpg')">
144
+ <img id="main_image" onClick="pageTracker._trackEvent('tfrog-click','full_image_click'); " class="border" src="/img377/9665/b97.jpg" alt="b97.jpg" style="width:360px;height:480px"/>
145
+ </div>
146
+ </div>
147
+
148
+
149
+
150
+ <!-- Action Buttons -->
151
+ <div id="Actions">
152
+ <ul >
153
+ <!-- <li><a href="javascript:;" class="act_facebook"><img src="/images/blue/facebook.png" alt="Facebook"/></a><div><a href="javascript:;" class="act_facebook">Facebook</a></div></li> -->
154
+ <li ><a href="http://yfrog.com?url=http%3A%2F%2Fimg377.imageshack.us%2Fimg377%2F9665%2Fb97.jpg" onClick="pageTracker._trackEvent('tfrog-click','tweet_icon_click');" target="_blank"><div style="margin-top:-2px;"><img src="/images/blue/tweet.png" alt="Twitter"/></div></a><a href="http://yfrog.com?url=http%3A%2F%2Fimg377.imageshack.us%2Fimg377%2F9665%2Fb97.jpg" target="_blank">Twitter</a></li>
155
+ <li onClick="pageTracker._trackEvent('tfrog-click','facebook_icon_click');" ><a><div style=""><script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><style> html .fb_share_link {background:url(/images/blue/facebook.png) no-repeat top left; }</style><a href="http://www.facebook.com/share.php?u=http://img377.imageshack.us/my.php?image=b97&via=blue" onclick="return fbs_click()" target="_blank" class="fb_share_link"><div style="margin-left:23px;">Facebook</div></a></div></a></li>
156
+ <li><a href="javascript:;" onClick="pageTracker._trackEvent('tfrog-click','email_icon_click');" class="act_emailthis"><img src="/images/blue/email.png" alt="Email"/></a><div><a href="javascript:;" class="act_emailthis">Email</a></div></li>
157
+
158
+ <li><a href="javascript:;" class="act_share"><img src="/images/blue/share.png" onClick="pageTracker._trackEvent('tfrog-click','share_icon_click');" alt="Share"/></a><div><a href="javascript:;" class="act_share">Share</a></div></li>
159
+ <li><a href="/img377/9665/b97.jpg" target="_blank" onClick="pageTracker._trackEvent('tfrog-click','full_icon_click');" class="last"><img src="/images/blue/full-size.png" alt="Full Size"/></a><div><a href="/img377/9665/b97.jpg" target="_blank" class="last">Full Size</a></div></li>
160
+
161
+
162
+ <li>
163
+ <a style="float:left;cursor:pointer;" title="Rotate Image Left"
164
+ onclick="rotator('left', 360, 480, 'img377/9665/b97.jpg' , start); if(start ==0){start = 1; }else{start=0;}
165
+ pageTracker._trackEvent('tfrog-click','rotate_left');">
166
+ <img src="/images/icon_reply.gif" alt="rotate left" />
167
+ </a>
168
+
169
+
170
+ <a style="margin:0px;padding-top:2px;padding-right:3px;padding-left:2px;">Rotate</a>
171
+
172
+ <a style="cursor:pointer;margin:0px;padding:0px;" title="Rotate Image Right "
173
+ onclick="rotator('right', 360, 480, 'img377/9665/b97.jpg', start ); if(start ==0){start = 1; }else{start=0;}
174
+ pageTracker._trackEvent('tfrog-click','rotate_right');">
175
+
176
+ <img style="margin:0px;padding-top:2px;" src="/images/rotate_back.gif" alt="rotate right" />
177
+ </a>
178
+
179
+ </li>
180
+
181
+
182
+ </ul>
183
+ </div>
184
+ <div class="clear"></div>
185
+
186
+
187
+
188
+ <!-- Twitter User -->
189
+
190
+
191
+ <!-- END twitter User-->
192
+
193
+ <!-- Comments -->
194
+
195
+ <div id="Comments">
196
+
197
+ <h2>Comments
198
+ <a href="http://img377.yfrog.com/img377/9665/b97.jpg.comments.xml" title="Subscribe to all new comments for this image" class="feedlink" type="application/atom+xml" target="_new">
199
+ <img src="/images/feed-icon-14x14.gif" title="Subscribe to all new comments for this image" alt="Subscribe to all new comments for this image"/>
200
+ </a>
201
+ </h2>
202
+ <div id="comment-error-1" class="comment-error">
203
+ In order to be able to leave a comment you must be both registered with ImageShack, and have chosen a user name.<br/>
204
+ </div>
205
+ <div id="comment-error-2" class="comment-error">
206
+
207
+ Sorry, we are unable to retrieve image information, please try later.<br/>
208
+ </div>
209
+ <div id="comment-error-3" class="comment-error">
210
+ Sorry, this image cannot have a comments<br/>
211
+ </div>
212
+ <div id="comment-error-4" class="comment-error">
213
+ Sorry, you are unable to leave comments right now, please try again later<br/>
214
+ </div>
215
+ <div id="comment-error-5" class="comment-error">
216
+
217
+ Sorry, only friends of this image's owner can leave comments<br/>
218
+ </div>
219
+
220
+ <div id="feedpostdiv">
221
+
222
+ <div id="commentArea" class="comment center-txt">
223
+ Leave a comment </div>
224
+
225
+ <div id="cauthrequiredexplain" class="comment-error">
226
+ In order to be able to leave a comment you must be both registered with ImageShack, and have chosen a user name.<br/>
227
+ </div>
228
+ <div id="textcomment" class="comment-edit">
229
+ <input onClick="pageTracker._trackEvent('blue-click','comment_box_click');" type="hidden" id="commentwelcome" value="Leave a comment"/>
230
+
231
+ <input type="hidden" name="feedpostserver" id="feedpostserver" value=""/>
232
+ <input type="hidden" name="feedposthash" id="feedposthash" value=""/>
233
+ <input type="hidden" name="feedpostimage" id="feedpostimage" value=""/>
234
+ <h3> Post a comment</h3>
235
+ <h4><span>Step 1:</span> Select account</h4>
236
+ <div class="msg-from">
237
+ <input type="radio" name="account_type" value="i" id="u_imageshack" checked="checked"/> <label id="i_label">ImageShack user </label>
238
+
239
+ <div class="account-details" id="u_imageshack_form">
240
+ <table>
241
+ <tr></td>
242
+ </tr>
243
+ <td><label>Username:</label></td>
244
+ <td><input type="text" id="i_username" value="" />
245
+ <tr>
246
+ <td><label>Password:</label></td>
247
+
248
+ <td><input type="password" id="i_password" value="" /> </td>
249
+ </tr>
250
+ <tr>
251
+ <td>&nbsp;</td>
252
+ <td><input type="checkbox" id="i_remember" value="1"/> <label>Remember me</label></td>
253
+ </tr>
254
+ </table>
255
+
256
+ </div>
257
+ <br/>
258
+ <input type="radio" name="account_type" value="t" id="u_twitter"/> <label id="t_label">Twitter user <div class="account-details" id="u_twitter_form" >
259
+ <a href="javascript:;" id="twitter_oauth"><img src="/images/sign-in-twitter.png" border="0"></a><br/>
260
+ <input type="checkbox" id="t_remember" value="1"/> <label>Remember me</label>
261
+
262
+ <input type="hidden" id="error_empty_captcha" value="Please, enter captcha text"/>
263
+ <input type="hidden" id="error_empty_login" value="Please, enter your login"/>
264
+
265
+ <input type="hidden" id="error_empty_password" value="Please, enter your password"/>
266
+ <input type="hidden" id="error_empty_comment" value="Please, enter comment text"/>
267
+ <input type="hidden" id="error_too_log_comment" value="Sorry, your comment is too long"/>
268
+ <input type="hidden" id="error_not_logged_yet" value="Sorry, you are not logged yet"/>
269
+
270
+ <input type="hidden" id="hide_replies" value="[ - ] Hide replies to this message"/>
271
+ <input type="hidden" id="show_replies" value="[ + ] Show replies to this message"/>
272
+
273
+ <input type="hidden" id="is_reply_to" value=""/>
274
+ </div>
275
+ </div> <!-- msg-from-->
276
+
277
+ <div class="comment-msg-edit">
278
+
279
+ <h4><span>Step 2:</span> Add comment and/or images and video</h4>
280
+ <div class="simbols-count" id="charsleft">1000</div>
281
+ <div class="comment-icon" style="margin-top:14px;"><img src="http://www.imageshack.us/common/images/no_photo.gif"/></div>
282
+ <textarea id="commenttext" size="10" class="comment left-txt" onkeydown="checkmessage()" onkeyup="checkmessage()"></textarea><br/>
283
+ <i class="explanation">You could use following HTML tags in your comments: <code>&lt;a&gt;, &lt;i&gt;, &lt;b&gt;</code></i> <br/><br/>
284
+
285
+ <div class="comments_add_media">
286
+ <label><input name="uploadtype" type="radio" id="comments_upload_image" > Upload image/video</label>
287
+ <label><input name="uploadtype" type="radio" id="comments_transload_image" checked="checked"> Upload URL</label>
288
+ <div id="comments_file_div" style="display:none;">
289
+ <form id="post_form" action="" method="post" enctype="multipart/form-data">
290
+ <input type="file" id="comments_file" value="" name="comment_media_file" size="42" class="browse"/>
291
+ <div id="new_params"></div>
292
+
293
+ </form>
294
+ </div>
295
+
296
+ <div id="comments_url_div" >
297
+ <input type="text" id="comments_url" value=" insert URL here.." class="browse" />
298
+ </div>
299
+ <i class="explanation">allowed formats: jpg jpeg png gif bmp tif tiff swf &lt; 1.5 megabytes.</i>
300
+ </div>
301
+
302
+ <h4><span>Step 3:</span> Type the text below to avoid spam</h4>
303
+ <div class="captcha">
304
+
305
+ <img id="captcha_img" src="/images/1pix.gif" onerror="this.src='/images/1pix.gif'"/><br/>
306
+ <div>Type the text:</div>
307
+ <img id="captcha_reload" src="/images/re-try.png" alt="Get a new text" class="re-try"/><input type="text" value="" id="captcha_text"/>
308
+ </div>
309
+
310
+ <div class="post-buttons">
311
+ <div id="loader"></div>
312
+ <a onClick="pageTracker._trackEvent('blue-click','post_comment');" href="javascript:;" id="post_comment">&nbsp;&nbsp;&nbsp;Post&nbsp;&nbsp;&nbsp;</a>
313
+ <a onClick="pageTracker._trackEvent('blue-click','cancel_comment');" href="javascript:;" id="cancel_comment">&nbsp;&nbsp;Cancel&nbsp;</a>
314
+
315
+ </div>
316
+ </div> <!-- comment-msg-edit-->
317
+ <div class="clear"></div>
318
+ </div><!-- comment-edit-->
319
+
320
+ </div> <!-- feedpostdiv -->
321
+ <div class="clear"></div>
322
+ <span id="no_comments_message" class="no_comments_message">No comments are made yet</span>
323
+
324
+ </div>
325
+
326
+ </div>
327
+
328
+ <div class="column-right">
329
+
330
+ <!-- Navigation Images -->
331
+ <div class="image-info">
332
+
333
+ <div id="UserImageInfoHeader" class="image-info-tab active">
334
+ <h2><a onClick="pageTracker._trackEvent('tfrog-click','user_image_stream_top');" href="http://www.yfrog.com/froggy.php?username=urbanflex" >urbanflex's</a> images</h2>
335
+ </div>
336
+ <div id="UserImageInfo" class="image-info-view" style="background:none;border:none;" >
337
+ <div class="navigation" style="background-color:none;height:130px;width:100%;">
338
+
339
+ <div class="nav-link left" id="prev" style="text-align:right;">
340
+ <div onClick='pageTracker._trackEvent("tfrog-click","previous_pic");' class="border small" style="height:110px;background:none;text-align:center;padding:5px; padding:bottom:0px;text-align:right; float:left;">
341
+ </div>
342
+ <a onClick='pageTracker._trackEvent("tfrog-click","previous_link");' href="http://img42.yfrog.com/i/1wh.jpg/"><img src="/images/prev_blue.gif" /> Prev</a>
343
+ </div>
344
+ <div class="nav-link right" id="next" style="text-align:left;">
345
+ <div onClick='pageTracker._trackEvent("tfrog-click","next_pic");' class="border small" style="height:110px;background:none; padding:5px; text-align:left; float:left;">
346
+
347
+ </div>
348
+ <a onClick='pageTracker._trackEvent("tfrog-click","next_link");' style="margin-left:5px;" href="http://img93.yfrog.com/i/zhh.jpg/">Next <img src="/images/next_blue.gif" /></a>
349
+ </div>
350
+
351
+ </div>
352
+ </div>
353
+ </div>
354
+ <div class="clear"></div>
355
+
356
+
357
+ <div style="height:5px;"></div>
358
+ <!-- BEGIN STANDARD TAG - 300 x 250 - imageshack: yFrogLanding - DO NOT MODIFY -->
359
+
360
+ <IFRAME FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=300 HEIGHT=250 SRC="/ym.php?section=615838"></IFRAME>
361
+ <!-- END TAG -->
362
+
363
+ <!-- Images Info - Accordion -->
364
+ <div class="image-info">
365
+
366
+ <div id="TopUserHeader" class="image-info-tab active">
367
+ <h2>Top Viewed Users on Yfrog</h2>
368
+ </div>
369
+ <div id="TopUser" class="image-info-view">
370
+
371
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
372
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;"><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img193.yfrog.com/i/i23.jpg/"><img src="http://a3.twimg.com/profile_images/207727011/jb_lvatt_cover_sq_72dpi__normal.jpg" /></a></div>
373
+ <div><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img193.yfrog.com/i/i23.jpg/">jonasbrothers</a></div>
374
+ <div>1,200,000+ views</div>
375
+ </div>
376
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
377
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;"><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img43.yfrog.com/i/rxdw.jpg/"><img src="http://a3.twimg.com/profile_images/404197561/9930_153717019777_744869777_3592623_8230070_n-1_normal.jpg" /></a></div>
378
+ <div><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img43.yfrog.com/i/rxdw.jpg/">david_henrie</a></div>
379
+
380
+ <div>800,000+ views</div>
381
+ </div>
382
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
383
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;"><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img33.yfrog.com/i/4lx.jpg/"><img src="http://a1.twimg.com/profile_images/245943614/twitter_normal.jpeg" /></a></div>
384
+ <div><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img33.yfrog.com/i/4lx.jpg/">tommcfly</a></div>
385
+ <div>800,000+ views</div>
386
+ </div>
387
+
388
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
389
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;"><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img197.yfrog.com/i/5y8a.jpg/"><img src="http://a1.twimg.com/profile_images/125749170/IMG_9698_normal.JPG" /></a></div>
390
+ <div><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img197.yfrog.com/i/5y8a.jpg/">johnlloydtaylor</a></div>
391
+ <div>500,000+ views</div>
392
+ </div>
393
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
394
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;"><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img4.yfrog.com/i/uipd.jpg/"><img src="http://a1.twimg.com/profile_images/318958908/DSC01035_normal.jpg" /></a></div>
395
+ <div><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img4.yfrog.com/i/uipd.jpg/">NathanFillion</a></div>
396
+
397
+ <div>400,000+ views</div>
398
+ </div>
399
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
400
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;"><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img44.yfrog.com/i/sb8x.jpg/"><img src="http://a3.twimg.com/profile_images/366311539/5451_140137440475_585305475_3644053_345122_n.jpg_normal.jpeg" /></a></div>
401
+ <div><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img44.yfrog.com/i/sb8x.jpg/">gfalcone601</a></div>
402
+ <div>300,000+ views</div>
403
+ </div>
404
+
405
+ <div id="more_button" name="more_button" style="display:block;float:right;width:100%;margin-bottom:10px;">
406
+ <a style="cursor:pointer;" onClick="pageTracker._trackEvent('tfrog-click','more_top_user'); document.getElementById('more_top').style.display='';document.getElementById('more_button').style.display='none';" >More Top Users</a>
407
+ </div>
408
+ <div id="more_top" name="more_top" style="display:none;">
409
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
410
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;" ><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img254.yfrog.com/i/jt7.jpg/"><img src="http://a1.twimg.com/profile_images/73332350/demi-moore_normal.jpg" /></a></div>
411
+ <div style=""><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img254.yfrog.com/i/jt7.jpg/">mrskutcher</a></div>
412
+ <div>300,000+ views</div>
413
+
414
+ </div>
415
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
416
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;" ><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img18.yfrog.com/i/adqj.jpg/"><img src="http://a1.twimg.com/profile_images/378590406/twitterpic1_normal.jpg" /></a></div>
417
+ <div style=""><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img18.yfrog.com/i/adqj.jpg/">johncmayer</a></div>
418
+ <div>300,000+ views</div>
419
+ </div>
420
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
421
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;" ><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img198.yfrog.com/i/p6km.jpg/"><img src="http://a3.twimg.com/profile_images/299580627/ls_1347_DPP_0063_PR_normal.jpg" /></a></div>
422
+
423
+ <div style=""><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img198.yfrog.com/i/p6km.jpg/">lancearmstrong</a></div>
424
+ <div>300,000+ views</div>
425
+ </div>
426
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
427
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;" ><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img89.yfrog.com/i/isoh.jpg/"><img src="http://a1.twimg.com/profile_images/87773290/CIMG1686_1_normal.JPG" /></a></div>
428
+ <div style=""><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img89.yfrog.com/i/isoh.jpg/">adammshankman</a></div>
429
+ <div>300,000+ views</div>
430
+
431
+ </div>
432
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
433
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;" ><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img35.yfrog.com/i/zxte.jpg/"><img src="http://a3.twimg.com/profile_images/215580573/10672_large_normal.jpg" /></a></div>
434
+ <div style=""><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img35.yfrog.com/i/zxte.jpg/">brodyjenner</a></div>
435
+ <div>300,000+ views</div>
436
+ </div>
437
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
438
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;" ><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img268.yfrog.com/i/d0pz.jpg/"><img src="http://a1.twimg.com/profile_images/299602090/ls_2796_image019_normal.jpg" /></a></div>
439
+
440
+ <div style=""><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img268.yfrog.com/i/d0pz.jpg/">levileipheimer</a></div>
441
+ <div>200,000+ views</div>
442
+ </div>
443
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
444
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;" ><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img193.yfrog.com/i/6d1.jpg/"><img src="http://a3.twimg.com/profile_images/400629189/twitterProfilePhoto_normal.jpg" /></a></div>
445
+ <div style=""><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img193.yfrog.com/i/6d1.jpg/">peterfacinelli</a></div>
446
+ <div>200,000+ views</div>
447
+
448
+ </div>
449
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
450
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;" ><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img143.yfrog.com/i/u31.jpg/"><img src="http://a3.twimg.com/profile_images/201009601/l_b79ceb58783c40e4a82b2d432c172f69_normal.jpg" /></a></div>
451
+ <div style=""><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img143.yfrog.com/i/u31.jpg/">juliannehough</a></div>
452
+ <div>200,000+ views</div>
453
+ </div>
454
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
455
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;" ><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img40.yfrog.com/i/g3acx.jpg/"><img src="http://a3.twimg.com/profile_images/115528167/3396557521_52901463ae_normal.jpg" /></a></div>
456
+
457
+ <div style=""><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img40.yfrog.com/i/g3acx.jpg/">feliciaday</a></div>
458
+ <div>200,000+ views</div>
459
+ </div>
460
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
461
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;" ><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img32.yfrog.com/i/8tv.jpg/"><img src="http://a3.twimg.com/profile_images/396447095/twitterProfilePhoto_normal.jpg" /></a></div>
462
+ <div style=""><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img32.yfrog.com/i/8tv.jpg/">mionzera</a></div>
463
+ <div>200,000+ views</div>
464
+
465
+ </div>
466
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
467
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;" ><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img4.yfrog.com/i/m9ma.jpg/"><img src="http://a3.twimg.com/profile_images/404337111/danny-gokey-elimination_normal.jpg" /></a></div>
468
+ <div style=""><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img4.yfrog.com/i/m9ma.jpg/">dannygokey</a></div>
469
+ <div>200,000+ views</div>
470
+ </div>
471
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
472
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;" ><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img35.yfrog.com/i/1l1d.jpg/"><img src="http://a1.twimg.com/profile_images/201536920/Picture_6_normal.png" /></a></div>
473
+
474
+ <div style=""><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img35.yfrog.com/i/1l1d.jpg/">itschristablack</a></div>
475
+ <div>200,000+ views</div>
476
+ </div>
477
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
478
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;" ><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img190.yfrog.com/i/507sbw.jpg/"><img src="http://a1.twimg.com/profile_images/95430096/avatar400_normal.jpg" /></a></div>
479
+ <div style=""><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img190.yfrog.com/i/507sbw.jpg/">fourzerotwo</a></div>
480
+ <div>200,000+ views</div>
481
+
482
+ </div>
483
+ <div style="width:50%;float:left;text-align:center;margin-bottom:5px;">
484
+ <div style="height:48px;width:48px;text-align:center;width:100%;padding-bottom:5px;" ><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img38.yfrog.com/i/anddb.jpg/"><img src="http://a1.twimg.com/profile_images/138575684/IMG_0686_normal.jpg" /></a></div>
485
+ <div style=""><a onClick='pageTracker._trackEvent("tfrog-click","top_user");' href="http://img38.yfrog.com/i/anddb.jpg/">stewartcink</a></div>
486
+ <div>100,000+ views</div>
487
+ </div>
488
+ <div id="less_button" name="less_button" style="display:block;float:right;width:100%;margin-bottom:10px;">
489
+ <a style="cursor:pointer;" onClick="pageTracker._trackEvent('tfrog-click','less_top_user');document.getElementById('more_top').style.display='none';document.getElementById('more_button').style.display='';" >Less</a>
490
+
491
+ </div>
492
+
493
+ </div>
494
+
495
+ <div class="clear"></div>
496
+ </div>
497
+
498
+
499
+
500
+ <div id="GeneralInfoHeader" class="image-info-tab active">
501
+ <h2>General Info</h2>
502
+
503
+ </div>
504
+
505
+ <div id="GeneralInfo" class="image-info-view">
506
+ <p>
507
+ <a onClick="pageTracker._trackEvent('tfrog-click','user_images_stream_gi');" href="http://www.yfrog.com/froggy.php?username=urbanflex" target="_blank">urbanflex</a> uploaded at <a href="javascript:;">2009-08-28</a> </p>
508
+
509
+
510
+ <div id="rating">
511
+ <ul class="star-rating" onClick='pageTracker._trackEvent("tfrog-click","rate_click");'>
512
+
513
+ <li class="current-rating" id="current-rating" style="width:0px;"></li>
514
+ <li><div class="rate1">1</div></li>
515
+ <li><div class="rate2">2</div></li>
516
+ <li><div class="rate3">3</div></li>
517
+ <li><div class="rate4">4</div></li>
518
+ <li><div class="rate5">5</div></li>
519
+
520
+ <li><div class="rate6">6</div></li>
521
+ <li><div class="rate7">7</div></li>
522
+ <li><div class="rate8">8</div></li>
523
+ <li><div class="rate9">9</div></li>
524
+ <li><div class="rate10">10</div></li>
525
+ </ul>
526
+
527
+ <div class="rating-message">0 rating</div>
528
+ </div>
529
+ <p>
530
+ View: <span>63</span> </p>
531
+ </div>
532
+
533
+
534
+
535
+ <div id="ImageCodesHeader" class="image-info-tab active">
536
+
537
+ <h2>Links to share this image</h2>
538
+ </div>
539
+ <div id="ImageCodes" class="image-info-view">
540
+ <div class="codes">
541
+ <div>
542
+ <label>Link</label><input onClick="pageTracker._trackEvent('tfrog-click','short_click');" readonly="readonly" class="readonly" value="http://yfrog.com/ahb97j"/>
543
+ </div>
544
+
545
+ <div id="new_link_bitly" style="" onmouseover="if(bit_done !=1){get_bitly();bit_done =1;}" >
546
+
547
+ <label>Short</label><input id="bitly_new_link" onClick="if(bit_done !=1){get_bitly();bit_done =1;}pageTracker._trackEvent('{$g_disp}','bitly_click');" readonly="readonly" class="readonly" value="http://bit.ly/aabbcc"/>
548
+ </div>
549
+
550
+
551
+ <div>
552
+ <label>Direct</label><input onClick="pageTracker._trackEvent('tfrog-click','direct_link_click');" readonly="readonly" class="readonly" value="http://img377.imageshack.us/img377/9665/b97.jpg"/>&nbsp;
553
+ <a href="http://img377.imageshack.us/img377/9665/b97.jpg" target="_blank"><img src="/images/blue/external.png" alt="Direct"/></a>
554
+ </div>
555
+ </div>
556
+
557
+
558
+ <div class="clear"></div>
559
+ </div>
560
+
561
+
562
+ <div id="LinkCodesHeader" class="image-info-tab non-active">
563
+ <h2>Embed this image</h2>
564
+ </div>
565
+ <div id="LinkCodes" class="image-info-view" style="display:none;">
566
+ <div class="codes">
567
+
568
+ <div>
569
+
570
+ <label>Forum</label><input readonly="readonly" class="readonly" onClick="pageTracker._trackEvent('tfrog-click','forum_link_click');" value="[URL=http://img377.imageshack.us/my.php?image=b97.jpg][IMG]http://img377.imageshack.us/img377/9665/b97.jpg[/IMG][/URL]"/>
571
+ </div>
572
+ <div>
573
+ <label>Alt Forum</label><input readonly="readonly" onClick="pageTracker._trackEvent('tfrog-click','alt_forum_link_click');" class="readonly" value="[URL=http://img377.imageshack.us/my.php?image=b97.jpg][IMG=http://img377.imageshack.us/img377/9665/b97.jpg][/IMG][/URL]"/>
574
+ </div>
575
+
576
+ <div>
577
+ <label>HTML</label><input readonly="readonly" class="readonly" onClick="pageTracker._trackEvent('tfrog-click','html_link_click');" value="&lt;a target=&#039;_blank&#039; title=&#039;ImageShack - Image And Video Hosting&#039; href=&#039;http://img377.imageshack.us/my.php?image=b97.jpg&#039;&gt;&lt;img src=&#039;http://img377.imageshack.us/img377/9665/b97.jpg&#039; border=&#039;0&#039;/&gt;&lt;/a&gt;"/> </div>
578
+
579
+ </div>
580
+ <div class="clear"></div>
581
+ </div>
582
+
583
+ <div id="ThumbCodesHeader" class="image-info-tab non-active">
584
+ <h2>Embed thumbnails of this image</h2>
585
+ </div>
586
+ <div id="ThumbCodes" class="image-info-view" style="display:none;">
587
+ <div class="codes">
588
+ <div>
589
+
590
+ <label>Forum</label><input readonly="readonly" onClick="pageTracker._trackEvent('tfrog-click','thumb_forum_click');" class="readonly" value="[URL=http://img377.imageshack.us/my.php?image=b97.jpg][IMG]http://img377.imageshack.us/img377/9665/b97.th.jpg[/IMG][/URL]"/>
591
+ </div>
592
+
593
+ <div>
594
+ <label>Alt Forum</label><input readonly="readonly" onClick="pageTracker._trackEvent('tfrog-click','thumb_alt_click');" class="readonly" value="[URL=http://img377.imageshack.us/my.php?image=b97.jpg][IMG=http://img377.imageshack.us/img377/9665/b97.th.jpg][/IMG][/URL]"/>
595
+ </div>
596
+ <div>
597
+ <label>HTML</label><input readonly="readonly" onClick="pageTracker._trackEvent('tfrog-click','thumb_html_click');" class="readonly" value="&lt;a target=&#039;_blank&#039; href=&#039;http://img377.imageshack.us/my.php?image=b97.jpg&#039;&gt;&lt;img src=&#039;http://img377.imageshack.us/img377/9665/b97.th.jpg&#039; border=&#039;0&#039;/&gt;&lt;/a&gt;"/>
598
+
599
+ </div>
600
+ </div>
601
+ <div class="clear"></div>
602
+ </div>
603
+
604
+ </div>
605
+
606
+ <div class="ads">
607
+ </div>
608
+
609
+ <textarea id="postcontent" style="display:none" rows="0" cols="0">&lt;a href=&quot;http://img377.imageshack.us/my.php?image=b97.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://img377.imageshack.us/img377/9665/b97.th.jpg&quot; border=&quot;0&quot; alt=&quot;Free Image Hosting at www.ImageShack.us&quot;&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;
610
+ Visit twitter~urbanflex&#039;s &lt;a href=&quot;http://profile.imageshack.us/user/twitter~urbanflex&quot;&gt;ImageShack profile&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;
611
+ &lt;a href=&quot;http://imageshack.us&quot;&gt;
612
+ &lt;img src=&quot;http://imageshack.us/img/is4.gif&quot; border=&quot;0&quot; alt=&quot;&quot;/&gt;
613
+ &lt;/a&gt;
614
+ &lt;a href=&quot;http://img604.imageshack.us/content.php?page=blogpost&amp;amp;files=b97.jpg-&quot; title=&quot;QuickPost&quot;&gt;
615
+ &lt;img src=&quot;http://imageshack.us/img/butansn.png&quot; alt=&quot;QuickPost&quot; border=&quot;0&quot;&gt;&lt;/a&gt;
616
+ Quickpost this image to Myspace, Digg, Facebook, and others!&lt;br/&gt;&lt;br/&gt;
617
+ </textarea>
618
+
619
+ </div>
620
+
621
+
622
+ <div style="clear:both; "></div>
623
+
624
+ <!------ MEnu Bottom------>
625
+ <div style="menu-bottom" style="width:100%;text-align:center;">
626
+ <hr style="width:95%;margin-top:5px;border-top: 1px #bbdae6 solid;">
627
+ <div class="copy" style="width:100%;text-align:center;">&copy; 2003-2009 ImageShack Corp. All rights reserved.</div>
628
+ <div class="bmenu" style="text-align:center;">
629
+ <a href="http://yfrog.com/">Home</a>&nbsp;&nbsp;|&nbsp;
630
+ <a href="http://twitter.com/yfrog">Follow yfrog on Twitter</a>&nbsp;&nbsp;|&nbsp;
631
+
632
+ <a href="#feedback" onclick="if(GSFN){GSFN.show();}">Send us your feedback</a> &nbsp;&nbsp;|&nbsp;
633
+ <a href="http://yfrog.com/api.php">API</a>&nbsp;&nbsp;|&nbsp;
634
+ <a href="http://reg.imageshack.us/content.php?page=aboutus">Learn about ImageShack</a>&nbsp;&nbsp;|&nbsp;
635
+ <a href="http://reg.imageshack.us/content.php?page=advertising">Advertise on ImageShack</a>&nbsp;&nbsp;|&nbsp;
636
+
637
+ <a href="http://yfrog.com/press-releases-and-media-coverage.php">Press Release and Media Coverage</a><br/>
638
+ <a href="http://blog.yfrog.com">Blog</a>&nbsp;&nbsp;|&nbsp
639
+ <a href="http://yfrog.com/faq.php">FAQ</a>&nbsp;&nbsp;|&nbsp
640
+ <a href="http://yfrog.com/partners.php">Partners</a>&nbsp;&nbsp;|&nbsp;
641
+ <a href="http://reg.imageshack.us/content.php?page=email&q=abuse">Report Abuse or Request Deletion</a>&nbsp;&nbsp;|&nbsp;
642
+
643
+ <a href="http://reg.imageshack.us/content.php?page=email&q=marketing">Marketing Opportunities</a>&nbsp;&nbsp;|&nbsp;
644
+ <a href="http://reg.imageshack.us/content.php?page=email">Contact ImageShack</a>
645
+ </div>
646
+ </div>
647
+
648
+
649
+
650
+ <script type="text/javascript" src="/scripts/jquery/jquery.js"></script>
651
+ <script type="text/javascript" src="/scripts/jquery/jquery-ui-1.7.1.custom.min.js"></script>
652
+
653
+ <script type="text/javascript" src="/scripts/jquery/jquery.cookie.js"></script>
654
+ <script type="text/javascript" src="/scripts/jquery/superfish.js"></script>
655
+ <script type="text/javascript" src="/scripts/common/core.js"></script>
656
+ <script type="text/javascript" src="/scripts/jquery/jquery.rotate.1-1.js"></script>
657
+ <script type="text/javascript" src="/scripts/my/my.js"></script>
658
+ <script type="text/javascript">
659
+ var LANG = 'en';
660
+ var IMAGE = 'b97.jpg';
661
+ var RELATED_IMAGES = []
662
+ var RELATED_IMAGES = [];
663
+ var bit_done =0;
664
+ var RELATED_IMAGES = [];
665
+ var PREV_IMAGE = '1wh.jpg';
666
+ var NEXT_IMAGE = 'zhh.jpg';
667
+ var PREV_SERVER = '42';
668
+ var NEXT_SERVER = '93';
669
+ var NEXT_L = 'img93/9876/zhh.jpg';
670
+ var PREV_L = 'img42/9277/1wh.jpg';
671
+ var SITE_NAME = 'yfrog';
672
+
673
+
674
+ var GEO = null;
675
+ var CHECK_VIDEO = false;
676
+ var GOOGLE_API_KEY = 'ABQIAAAAnLzWzDQHx5o45TrEqqzvRhQI6zsOVvbV6CRfHi0l-geTELScARS4fwRoQNlfWFshUFc69YcRuNER3A';
677
+ </script>
678
+ <script type="text/javascript" src="http://cdn.gigya.com/wildfire/js/wfapiv2.js"></script>
679
+
680
+
681
+ <!----------------------- Start get Satisfaction
682
+ -->
683
+
684
+ <style type='text/css'>@import url('http://s3.amazonaws.com/getsatisfaction.com/feedback/feedback.css');</style>
685
+ <script src='http://s3.amazonaws.com/getsatisfaction.com/feedback/feedback.js'type='text/javascript'></script>
686
+ <script type="text/javascript" charset="utf-8"> var tab_options = {}; tab_options.placement = "hidden";
687
+ </script>
688
+
689
+
690
+ <style type='text/css'>@import url('http://s3.amazonaws.com/getsatisfaction.com/feedback/feedback.css');</style>
691
+ <script src='http://s3.amazonaws.com/getsatisfaction.com/feedback/feedback.js'type='text/javascript'></script>
692
+ <script type="text/javascript" charset="utf-8">
693
+ var tab_options = {}
694
+ tab_options.placement = "hidden"; // left, right, bottom, hidden
695
+ tab_options.color = "red"; // hex (#FF0000) or color (red)
696
+
697
+ GSFN.feedback('http://getsatisfaction.com/yfrog/feedback/topics/new?display=overlay&amp;style=question', tab_options);
698
+ </script>
699
+
700
+ <!-- End Get Satisfaction-->
701
+
702
+ <!-- Start Quantcast tag -->
703
+ <script type="text/javascript">
704
+
705
+ _qoptions={
706
+ qacct:"p-65DrxcUXjcWq6",
707
+ labels:"YfrogLandingPage"
708
+ };
709
+
710
+ </script>
711
+ <script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
712
+ <noscript>
713
+ <a href="http://www.quantcast.com/p-65DrxcUXjcWq6" target="_blank"><img src="http://pixel.quantserve.com/pixel/p-65DrxcUXjcWq6.gif?labels=MyPage" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/></a>
714
+ </noscript>
715
+ <!-- End Quantcast tag -->
716
+
717
+ </div> <!-- MAIN body for crazy backgrounds-->
718
+ </body>
719
+ </html>
@@ -0,0 +1 @@
1
+ replace_this_with_your_api_key
@@ -0,0 +1,80 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+
3
+ # These are integration-level tests that actually hit the services that this library supports
4
+ # in order to ensure that image extraction works properly. This is guaranteed *not* to work and
5
+ # is not included in the default rake tasks.
6
+ #
7
+ # If you *really* want to run this, use `rake integration` - don't complain if it doesn't work.
8
+ #
9
+
10
+ api_key = File.read(File.dirname(__FILE__) + '/../flickr_api_key').strip
11
+ SnipSnap.flickr_api_key = api_key
12
+
13
+ class ResponseTest < Test::Unit::TestCase
14
+
15
+ context "The SnipSnap library" do
16
+
17
+ should "be able to find the image in a Skitch URL" do
18
+ client = SnipSnap.from_url('http://skitch.com/reagent/bh4ei/inbox-gmail-29466-messages-130-unread')
19
+ client.image_url.should == 'http://img.skitch.com/20090909-bw3tnhse6rhn68erk6wpa882ea.jpg'
20
+ end
21
+
22
+ should "be able to find an image in a shortened Yfrog URL" do
23
+ client = SnipSnap.from_url('http://yfrog.com/ahb97j')
24
+ client.image_url.should == 'http://img377.yfrog.com/img377/9665/b97.jpg'
25
+ end
26
+
27
+ should "be able to find an image in a Yfrog.us URL" do
28
+ client = SnipSnap.from_url('http://yfrog.us/ahb97j')
29
+ client.image_url.should == 'http://img377.yfrog.com/img377/9665/b97.jpg'
30
+ end
31
+
32
+ should "be able to find an image in an expanded Yfrog URL" do
33
+ client = SnipSnap.from_url('http://img377.yfrog.com/i/b97.jpg/')
34
+ client.image_url.should == 'http://img377.yfrog.com/img377/9665/b97.jpg'
35
+ end
36
+
37
+ should "be able to find an image in a Twitpic URL" do
38
+ client = SnipSnap.from_url('http://twitpic.com/h18dg')
39
+ client.image_url.should == 'http://twitpic.com/show/large/h18dg'
40
+ end
41
+
42
+ should "be able to find an image in a shortened Flickr URL" do
43
+ client = SnipSnap.from_url('http://flic.kr/p/5TTbLX')
44
+ client.image_url.should == 'http://farm4.static.flickr.com/3449/3212555327_14d2d3f8b0.jpg'
45
+ end
46
+
47
+ should "be able to find an image in an expanded Flickr URL" do
48
+ client = SnipSnap.from_url('http://flickr.com/photos/aureliaholandabarrigana/3212555327/')
49
+ client.image_url.should == 'http://farm4.static.flickr.com/3449/3212555327_14d2d3f8b0.jpg'
50
+ end
51
+
52
+ should "be able to find an image in an img.ly URL" do
53
+ client = SnipSnap.from_url('http://img.ly/3ey')
54
+ client.image_url.should =~ /http:\/\/img\.ly\/media\/12434\/large_ChillPill13\.jpg/
55
+ end
56
+
57
+ should "be able to find an image from a URL with a correct MIME type" do
58
+ client = SnipSnap.from_url('http://img.ly/media/12434/large_ChillPill13.jpg')
59
+ client.image_url.should == 'http://img.ly/media/12434/large_ChillPill13.jpg'
60
+ end
61
+
62
+ should "be able to find an image form a URL with a correct extension" do
63
+ client = SnipSnap.from_url('http://1.bp.blogspot.com/_PnT6fOkhWyg/Smfa0gGhDzI/AAAAAAAABz8/BAweS5dIBCc/s1600-h/3747620025_21e47ae06f.jpg')
64
+ client.image_url.should == 'http://1.bp.blogspot.com/_PnT6fOkhWyg/Smfa0gGhDzI/AAAAAAAABz8/BAweS5dIBCc/s1600-h/3747620025_21e47ae06f.jpg'
65
+ end
66
+
67
+ should "not return an image url for something that is not an image" do
68
+ client = SnipSnap.from_url('http://lolwut.com/')
69
+ client.image_url.should be_nil
70
+ end
71
+
72
+ should "be able to find an image in a shortened URL that points to an image" do
73
+ client = SnipSnap.from_url('http://bit.ly/92g4x')
74
+ client.image_url.should == 'http://1.bp.blogspot.com/_PnT6fOkhWyg/Smfa0gGhDzI/AAAAAAAABz8/BAweS5dIBCc/s1600-h/3747620025_21e47ae06f.jpg'
75
+ end
76
+
77
+
78
+ end
79
+
80
+ end
@@ -19,12 +19,20 @@ module SnipSnap
19
19
  end
20
20
 
21
21
  should "know the extension of the file referenced by the URL" do
22
+ response = stub() {|r| r.stubs(:last_effective_url).with().returns('http://example.com/image.jpg') }
23
+
22
24
  i = SnipSnap::Image.new('http://example.com/image.jpg')
25
+ i.stubs(:response).with().returns(response)
26
+
23
27
  i.extension.should == 'jpg'
24
28
  end
25
29
 
26
30
  should "know that the extension is nil if the URL has no file extension" do
31
+ response = stub() {|r| r.stubs(:last_effective_url).with().returns('http://example.com/path') }
32
+
27
33
  i = SnipSnap::Image.new('http://example.com/path')
34
+ i.stubs(:response).with().returns(response)
35
+
28
36
  i.extension.should be_nil
29
37
  end
30
38
 
@@ -65,10 +73,13 @@ module SnipSnap
65
73
  end
66
74
 
67
75
  should "know the URL for the image" do
76
+ response = stub() {|r| r.stubs(:last_effective_url).with().returns('final_url') }
77
+
68
78
  i = SnipSnap::Image.new(@url)
69
79
  i.stubs(:image?).with().returns(true)
80
+ i.stubs(:response).with().returns(response)
70
81
 
71
- i.image_url.should == @url
82
+ i.image_url.should == 'final_url'
72
83
  end
73
84
 
74
85
  should "return nil for the image's URL if it is not an image" do
@@ -9,21 +9,15 @@ module SnipSnap
9
9
  @expanded_url = 'http://twitpic.com/show/large/203o0'
10
10
  end
11
11
 
12
- should "have a url derived from the source URL" do
12
+ should "know the identifier" do
13
13
  t = SnipSnap::Twitpic.new(@url)
14
- t.url.should == @expanded_url
14
+ t.identifier.should == '203o0'
15
15
  end
16
16
 
17
- should "be able to return an image url for a given url" do
18
- response = stub()
19
- response.stubs(:last_effective_url).with().returns(@expanded_url)
20
-
17
+ should "have an image url derived from the source URL" do
21
18
  t = SnipSnap::Twitpic.new(@url)
22
- t.stubs(:response).with().returns(response)
23
-
24
19
  t.image_url.should == @expanded_url
25
20
  end
26
-
27
21
 
28
22
  end
29
23
 
@@ -14,20 +14,15 @@ module SnipSnap
14
14
  y.should be_image
15
15
  end
16
16
 
17
- should "have a url derived from the source URL" do
18
- y = SnipSnap::Yfrog.new(@url)
19
- y.url.should == @expanded_url
20
- end
21
-
22
17
  should "be able to return an image url for a given url" do
23
18
  y = SnipSnap::Yfrog.new(@url)
24
19
 
25
20
  response = stub()
26
- response.stubs(:body_str).with().returns(read_fixture('yfrog.xml'))
21
+ response.stubs(:body_str).with().returns(read_fixture('yfrog.html'))
27
22
 
28
23
  y.stubs(:response).with().returns(response)
29
24
 
30
- y.image_url.should == 'http://img377.imageshack.us/img377/9665/b97.jpg'
25
+ y.image_url.should == 'http://img377.yfrog.com/img377/9665/b97.jpg'
31
26
  end
32
27
 
33
28
  end
@@ -29,6 +29,11 @@ class SnipSnapTest < Test::Unit::TestCase
29
29
  SnipSnap.class_name_for(url).should == 'Yfrog'
30
30
  end
31
31
 
32
+ should "know the correct class name for an expanded Yfrog URL" do
33
+ url = 'http://img377.yfrog.com/i/b97.jpg/'
34
+ SnipSnap.class_name_for(url).should == 'Yfrog'
35
+ end
36
+
32
37
  should "know the correct class name for a Flickr URL" do
33
38
  url = 'http://flic.kr/p/64cBqN'
34
39
  SnipSnap.class_name_for(url).should == 'Flickr'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reagent-snip-snap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Reagan
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-07 00:00:00 -07:00
12
+ date: 2009-09-09 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -55,7 +55,10 @@ files:
55
55
  - lib/snip_snap.rb
56
56
  - test/fixtures
57
57
  - test/fixtures/skitch.html
58
- - test/fixtures/yfrog.xml
58
+ - test/fixtures/yfrog.html
59
+ - test/flickr_api_key.example
60
+ - test/integration
61
+ - test/integration/response_test.rb
59
62
  - test/test_helper.rb
60
63
  - test/unit
61
64
  - test/unit/snip_snap
@@ -69,7 +72,6 @@ files:
69
72
  - test/unit/snip_snap_test.rb
70
73
  has_rdoc: false
71
74
  homepage: http://sneaq.net
72
- licenses:
73
75
  post_install_message:
74
76
  rdoc_options:
75
77
  - --main
@@ -91,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
93
  requirements: []
92
94
 
93
95
  rubyforge_project:
94
- rubygems_version: 1.3.5
96
+ rubygems_version: 1.2.0
95
97
  signing_key:
96
98
  specification_version: 3
97
99
  summary: A ruby library that allows you to extract images from popular image-sharing services
@@ -1,35 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?><imginfo xmlns="http://ns.imageshack.us/imginfo/7/" version="7" timestamp="1251516300">
2
- <rating>
3
- <ratings>0</ratings>
4
- <avg>0.0</avg>
5
- </rating>
6
- <files server="377" bucket="9665">
7
- <image size="29599" content-type="image/jpeg">b97.jpg</image>
8
- <thumb size="4042" content-type="image/jpeg">b97.th.jpg</thumb>
9
- </files>
10
- <resolution>
11
- <width>525</width>
12
- <height>700</height>
13
- </resolution>
14
- <class>r</class>
15
- <visibility>yes</visibility>
16
- <uploader>
17
- <ip>38.99.76.246</ip>
18
- <cookie>1d5927aee7676b56f5fb5e1c6dc386bf</cookie>
19
- <username>twitter~urbanflex</username>
20
- </uploader>
21
- <links>
22
- <image_link>http://img377.imageshack.us/img377/9665/b97.jpg</image_link>
23
- <image_html>&lt;a href=&quot;http://img377.imageshack.us/my.php?image=b97.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://img377.imageshack.us/img377/9665/b97.jpg&quot; alt=&quot;Free Image Hosting at www.ImageShack.us&quot; border=&quot;0&quot;/&gt;&lt;/a&gt;</image_html>
24
- <image_bb>[URL=http://img377.imageshack.us/my.php?image=b97.jpg][IMG]http://img377.imageshack.us/img377/9665/b97.jpg[/IMG][/URL]</image_bb>
25
- <image_bb2>[url=http://img377.imageshack.us/my.php?image=b97.jpg][img=http://img377.imageshack.us/img377/9665/b97.jpg][/url]</image_bb2>
26
- <thumb_link>http://img377.imageshack.us/img377/9665/b97.th.jpg</thumb_link>
27
- <thumb_html>&lt;a href=&quot;http://img377.imageshack.us/my.php?image=b97.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://img377.imageshack.us/img377/9665/b97.th.jpg&quot; alt=&quot;Free Image Hosting at www.ImageShack.us&quot; border=&quot;0&quot;/&gt;&lt;/a&gt;</thumb_html>
28
- <thumb_bb>[URL=http://img377.imageshack.us/my.php?image=b97.jpg][IMG]http://img377.imageshack.us/img377/9665/b97.th.jpg[/IMG][/URL]</thumb_bb>
29
- <thumb_bb2>[url=http://img377.imageshack.us/my.php?image=b97.jpg][img=http://img377.imageshack.us/img377/9665/b97.th.jpg][/url]</thumb_bb2>
30
- <yfrog_link>http://yfrog.com/ahb97j</yfrog_link>
31
- <yfrog_thumb>http://yfrog.com/ahb97j.th.jpg</yfrog_thumb>
32
- <ad_link>http://img377.imageshack.us/my.php?image=b97.jpg</ad_link>
33
- <done_page>http://img377.imageshack.us/content.php?page=done&amp;l=img377/9665/b97.jpg</done_page>
34
- </links>
35
- </imginfo>