Is it possible to get static image URL from the flickr URL via an api call or some script ?
For eg :
Flickr URL -> http://www.flickr.com/photos/53067560@N00/2658147888/in/set-72157606175084388/
Static image URL -> http://farm4.static.flickr.com/3221/2658147888_826edc8465.jpg
相关问题
- clojure oauth and credentials
- Beautifulsoup returns incomplete html
- How can I get one photo for every Flickr tag by a
- Flickr authentication with Oauth
- Android: Upload picture on Flickr
相关文章
- Flickr Search and Interestingness API are returnin
- How do I parse this Flickr response?
- jQuery, JSON, Flickr API
- ObjectiveFlickr Photo Upload Error
- Populating a GridView with ImageViews dynamically/
- JavaScript library similar to Imagemagick (i.e., r
- How do REST APIs work with JavaScript when the sam
- jQuery $.getJSON - How do I parse a flickr.photos.
With specifying
extras=url_o
you get a link to the original image:For downscaled images, you use the following parameters:
url_t, url_s, url_q, url_m, url_n, url_z, url_c, url_l
Alternatively, you can construct the URL as described:
In your Flickr URL, the photo ID is 2658147888. You use flickr.photos.getSizes to get the various sizes of the photo available, and pick the url you want from that, depending on the size. There are several ways to access the API so please specify if you want more details for a particular language.
Not sure if you can get it directly through a single API call, but this link explains how the urls for the images are contructed: link
You can also access the original image using the photoId (number before the first underscore)
http://flickr.com/photo.gne?id=photoId
In your case it would be:
https://www.flickr.com/photo.gne?id=2658147888
Below a solution without using flickr-apis, only standard Linux commands (actually I ran it on MS Windows with Cygwin):
Here the script, you can use it as a start for your explorations:
Here's some code I wrote to retrieve metadata from a Flickr Photo based on its ID:
I first defined a javascript object
FlickrPhoto
to hold the photo's metadata:I then created a
FlickrService
object to hold my Flickr API Key and all my ajax calls to the RESTful API.The
getPhotoInfo
function takes the Photo ID as parameter, constructs the appropriate ajax call and passes aFlickrPhoto
object containing the photo metadata to a callback function.You can then use the service as follows:
Hope it helps.