- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Content-Length of Snapshot URL only 345 Byte
EDIT
My bad, I should have checked the raw content of my "downloaded" file. I'm getting a "400-Bad Request" response on the download. I'll investigate this a bit more.
**********
Hello everyone,
I'm not new to APIs but currently working on my first tool for the Meraki API. And I'm running into an issue not directly connected to the API but to the download URL provided after making the request.
The response header is giving me a "Content-Length" value of 345. The image itself is way larger though.
I tried the typical python code lines with 'requests.get()', 'requests.get(stream=True)', reading chunks, urllib2, ... but nothing really works. And I don't actually want to overwrite the header in any way.
Does anyone ran into this issue and found a way to fix it?
Thanks!
The response header I'm getting back:
{'Server': 'nginx', 'Date': 'Tue, 12 Oct 2021 20:04:59 GMT', 'Content-Type': 'application/vnd.apple.mpegurl', 'Content-Length': '345', 'Connection': 'keep-alive', 'X-Content-Type-Options': 'nosniff', 'Access-Control-Allow-Credentials': 'true'}
Solved! Go to solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Remember, it's only a URL you are being given. You have to download the URL to get the actual image.
Also note that you can't download the URL straight away. You'll want to use a loop and attempt the download multiple times with a delay in between each attempt (like 20s).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Remember, it's only a URL you are being given. You have to download the URL to get the actual image.
Also note that you can't download the URL straight away. You'll want to use a loop and attempt the download multiple times with a delay in between each attempt (like 20s).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The delay was the perfect tip. It's working perfectly now. Thank you!
