Get video URL link faster
Is there a way to get the video link for the video faster? I have a few hundred videos, and I retrieve the links for each of them by using
for x in eventidlist:
adddownloadurl = doorbell.recording_url(x)
downloasdurl.append(adddownloadurl)
print(downloasdurl)
print("download url number of items is now " + str(len(downloasdurl)) )
But it takes forever to get just one link. At least a good 15-30 seconds or more. When I went straight to ring to get the video url, they gave it to me much more faster. Is there a faster way to get the video url for each video?
I don't get why such simple questions do not get any answers, I'd love to know it too...
EDIT: after experimenting I found out that changing the recording_url function in line 316 from:
def recording_url(self, recording_id):
"""Return HTTPS recording URL."""
if not self.has_subscription:
msg = "Your Ring account does not have an active subscription."
_LOGGER.warning(msg)
return False
url = API_URI + URL_RECORDING.format(recording_id)
req = self._ring.query(url, raw=True)
if req and req.status_code == 200:
return req.url
return False
to
def recording_url(self, recording_id):
url = API_URI + URL_RECORDING.format(recording_id)
req = self._ring.query(url, raw=True)
return req.url
will improve the URL grab times from 30 seconds to like 5 secs
There hasn't been any activity on this issue recently. This issue has been automatically marked as stale because of that. It will be closed if no further activity occurs. Please make sure to update to the latest ring_doorbell version and check if that solves the issue. Thank you for your contributions.