rsgalloway / dropcam Goto Github PK
View Code? Open in Web Editor NEWDropcam Python API
License: BSD 3-Clause "New" or "Revised" License
Dropcam Python API
License: BSD 3-Clause "New" or "Revised" License
Probably not the fault of this module in any way, but filing here to track it.
https://www.dropcam.com/api/v1/cameras.get_image is returning a 404 as of this afternoon.
https://www.dropcam.com/api/v1/cameras.get works however.
Inspecting the JS on the Dropcam web console, it looks like the URL they're still using is:
https://nexusapi.dropcam.com/get_image?width=nnn&uuid=xxx
This may be Cookie related.
The Cookie this module uses, per Dropcam.cookie, resembles this:
website_2=xxx; Domain=.dropcam.com; httponly; Path=/; secure
The Cookie returned by Dropcam's web port does not have the Domain, httponly, Path or secure fields.
Negating those fields resolves and reverting to the nexusapi url resolves the 404 problem and returns an image.
I tried to create a dropcam obj using d = Dropcam(<MY USERNAME>, <MY PASSWORD>)
and get error HTTPError: HTTP Error 405: METHOD NOT ALLOWED
. Should I use the username and password to login Dropcam website or something else?
login failed and returned status code 200. login json: {"status": 400, "items": [], "status_description": "bad-request", "status_detail": "No user is identified with this information."}
These same credentials work with this other library: https://github.com/alexlincoln/dropcam.
I was able to create a Dropcam instance and log in to my camera, but I'm having the following failure. I know that login was successful because I am able to access the properties such as camera on/off status. Can you recommend any trouble shooting? I'm running on linux. Thanks.
temp = c.get_image()
Traceback (most recent call last):
File "", line 1, in
File "build/bdist.linux-x86_64/egg/dropcam.py", line 147, in get_image
File "build/bdist.linux-x86_64/egg/dropcam.py", line 120, in _request
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 406, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 444, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: Forbidden
We want JSON.
When I try to login I get this error. I am certain my credentials are correct, a possible bug?:
login failed and returned status code 200. login json: {"status": 400, "items": [], "status_description": "bad-request", "status_detail": "The username and password do not match"}
Traceback (most recent call last):
File "dropcam.py", line 267, in
os.getenv("password"))
File "dropcam.py", line 127, in init
self._login()
File "dropcam.py", line 139, in _login
raise Exception
Exception
Thanks for the great work. I just purchase the second dropcam and have trouble to obtain both image. Could you please have a look?
c = d.cameras()[1]
Traceback (most recent call last):
File "", line 1, in
IndexError: list index out of range
from dropcam import Dropcam
d = Dropcam(username, password)
c = d.cameras()[0]
c.save_image('image.jpg')
I tried with the sample code, and got size 0 image.jpg . I am very confused. Any suggestion?
It looks like Dropcam now requires the Referer header to be set (according to http://support.dropcam.com/entries/21455573-dropcam-API), otherwise the login method fails.
This repo shows 0.3.2. But pypi says 0.4.0. Did you release a 0.4.0 and then pull it back?
I am using it by cron, and getting ERROR report to mail. It is very annoying. Is it possible to disable? THANKS!
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.