akirahrkw / python-500px Goto Github PK
View Code? Open in Web Editor NEW500px API library for python
500px API library for python
I am having some trouble with the favourite post:
...OAuthHandler - set_request_token - xauth set_access_token and so on
for s in popular['photos']:
photo_id = s['id']
api.photos_favorite_post(id=photo_id)
So right after the first loop I get the error: 500PX error response: status code = 401
I tried re setting the access token by handler.set_access_token(xauth_token.key, xauth_token.secret)
but no avail.
Any ideas?
I trying yo use the api for 500px but i have some troubles, in the first step all is fine, i can generate OAuthHandler handler and get the url authorization then redirect the user to it, but when 500px.com redirect to my app and i try to create again the OAuthHandler next i try to pass the oauth_verifier to new handler but the 500px response me "HTTP Error 401: Unauthorized" and i don't know why
class FiveHundredpx(web.RequestHandler):
def get(self):
oauth_token = self.get_argument('oauth_token', None)
oauth_verifier = self.get_argument('oauth_verifier', None)
if not oauth_verifier:
handler = OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
token = handler.get_request_token()
self.set_cookie('oauth_token', token.key)
self.set_cookie('oauth_token_secret', token.secret)
self.redirect(handler.get_authorization_url()+'&display=popup')
else:
handler = OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
handler.set_request_token(self.get_cookie('oauth_token'), self.get_cookie('oauth_token_secret'))
handler.set_access_token(oauth_token, self.get_cookie('oauth_token_secret'))
handler.get_access_token(oauth_verifier)
unauthorized_api = FiveHundredPXAPI(handler)
The API was shutdown on June 15th, does this work, or did this stop working as well?
https://support.500px.com/hc/en-us/articles/360002435653-API-
I am unable to get an access token. The script errors when attempting to run the following line found in Auth.py:
response = urlopen(Request(url,headers=request.to_header()))
Hi,
install_requires in setup.py declares a dependency on httplib. AFAIK this module does not exist in pypi and is shipped with python. PIP / easy_install are not able to resolve the dependency and your module cannot be installed. I think this dependency should be removed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.