flickr

Flickr API: Upload an image with python

江枫思渺然 提交于 2021-02-07 07:21:30
问题 I have a problem to upload an image trought the Flickr API. I use OAuthLib-requests (https://github.com/requests/requests-oauthlib) The Flickr doc: https://secure.flickr.com/services/api/upload.api.html My code: params = { 'format' : 'json', "nojsoncallback" : "1", 'api_key' : 'my_api_key', } with open('myfile.jpg', 'rb') as f: files = {'file': f} r = the_oauth_requests_session.post('https://up.flickr.com/services/upload/', params=params, files=files) print r.content But in the content I can

clojure oauth and credentials

泄露秘密 提交于 2020-02-29 17:50:09
问题 I need some help with clojure and oauth. I got stuck at the last step: signing the request with the credentials. (def credentials (oauth/credentials consumer (:oauth_token access-token-response) (:oauth_token_secret access-token-response) :POST "http://twitter.com/statuses/update.json" {:status "posting from #clojure with #oauth"})) (http/put "http://twitter.com/statuses/update.json" :query-params credentials) Thats the example from github. Now, from the flickr API I have this test-url: http:

How do I parse this Flickr response?

荒凉一梦 提交于 2020-02-01 03:16:46
问题 I get this from a sample Flickr response in their api site: jsonFlickrApi({"method":{"_content":"flickr.test.echo"}, "format":{"_content":"json"}, "api_key":{"_content":"8038f7f7d7151ccbf6df2aa10b1b35ae"}, "stat":"ok"}) I can see the dictionary in there, right after the words jsonFlickApi. But how do I get rid of that leading text and put the dictionary into my NSDictionary? 回答1: Use the NSJSONSerialization class to parse the JSON data. Edit: The jsonFlickrApi(...) indicates that you're using

Prototype + Flickr Ajax Request doesn't work with Firefox

末鹿安然 提交于 2020-01-25 09:16:08
问题 Hi every one I have a weird issue I been working with the Flickr API, in Flickr for make a connection with the server is through url format in my case something like this http://api.flickr.com/services/rest/?method=flickr.photosets.getList&api_key=10cb3dccaa050efebdc01540c1d4d227&user_id=51390557@N07&format=json If your run into any browser you are going to get a flickr function and is ok, but Im trying to obtain with Ajax of Prototype Im doing something like new Ajax.Request('http://api

Beautifulsoup returns incomplete html

梦想的初衷 提交于 2020-01-23 17:08:39
问题 I am reading a book about Python right now. There is a small project for homework: "Write a program that goes to a photo-sharing site like Flickr or Imgur, searches for a category of photos, and then downloads all the resulting images." It is suggested to use only webbrowser, requests and bs4 libraries. I cannot do it for Flickr. I found that the parser cannot go inside the element (div class="interaction-view"). Using "Inspect element" in Chrome I can see that there are a few "div" elements

JavaScript library similar to Imagemagick (i.e., resize images and pictures while maximizing picture fidelity)?

蓝咒 提交于 2020-01-12 14:02:39
问题 We would like to simulate Imagemagick functionality, but only in Javascript. Do any libraries exist? Specifically, the goal is to display thumbnails of images without distorting the thumbnail to the point where it is hardly resembles the original. This often happens with simple resizing via CSS. One approach is to resize images on the server with Imagemagick. The question is, if we don't want to store the thumbnails (because the originals are loaded from a third party which doesn't supply

Flickr API iOS app “POST size too large!”

做~自己de王妃 提交于 2020-01-11 07:34:06
问题 I am trying to send a photo from an iOS app to Flickr using the API. I have successfully got the authorisation working and have a token ready to use. I am sending the photo data over a HTTP POST and am following the formatting guide here. http://www.flickr.com/services/api/upload.example.html But the response I get back from the API is... <err code="93" msg="POST size too large! Try something smaller, mmkay?" /> I have read that it may have something to do with the boundary's. I've doubled

NSInvalidArgumentException reason: data parameter is nil in UITableView while trying to display the Flickr images

拈花ヽ惹草 提交于 2020-01-05 02:53:50
问题 Hi in my application I want to display the Flickr album list in UITableView so i have searched for long time and i have found some solution. I have used the method which given in the solution its not working its giving error like NSInvalidArgumentException', reason: 'data parameter is nil The solution link click here And since I'm trying this for first time I'm not able resolve this issue. This is MY API LINK for Flickr I have used this code to display the Flickr image Album list in

$.getJSON syntax issue

跟風遠走 提交于 2020-01-04 15:56:52
问题 I'm about to rip out my eyes and eat them. I'm trying to pull data from flickr and apparently I have no idea what I'm doing. This works: var flickrAPI = "https://api.flickr.com/services/rest/api_key=xxxxx"; $.get(flickrAPI, { method: "flickr.photosets.getList", format: "json", user_id: "xxxxx" }, alert("ok") ); And I am alerted "ok" However when I try to use function() {} in place of alert()... var flickrAPI = "https://api.flickr.com/services/rest/api_key=xxxxx"; $.get(flickrAPI, { method:

App Transport Security Exceptions IOS9

瘦欲@ 提交于 2020-01-04 05:34:06
问题 I am writing an IOS9 app which uses flickr. Flicker uses an url format of https://farm{farm-id}.staticflickr.com/ The farm id is a number In my info.plist I have defined whitelisted domains NSAppTransportSecurity - NSExceptionDomains How can I define these for the farm id as a wild card? Currently I just did farm1.staticflickr.com farm2.staticflickr.com......up till 9 but I am unsure how far flickr goes. 回答1: Add an exception for staticflickr.com and in that exception add a key called