Instagram-API
Instagram-API copied to clipboard
uploadVideo failed
I think it's because variable resp have HTTP/1.1 Continued, so when using json.loads, it's can not loads because the string contain another dict as results. See resp log below:
HTTP/1.1 100 Continue
Date: Wed, 11 Jan 2017 14:37:56 GMT
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 11 Jan 2017 14:37:57 GMT
Content-Type: application/json
Cache-Control: private, no-cache, no-store, must-revalidate
Content-Language: en
Expires: Sat, 01 Jan 2000 00:00:00 GMT
Pragma: no-cache
Vary: Cookie, Accept-Language
Set-Cookie: csrftoken=cVer9pbrdXhLkhNKz4U9BSl5L0DBc1Di; expires=Wed, 10-Jan-2018 14:37:57 GMT; Max-Age=31449600; Path=/; Secure
Connection: keep-alive
Content-Length: 70
{"result": "deprecated", "configure_delay_ms": "6500", "status": "ok"}HTTP/1.1 100 Continue
Date: Wed, 11 Jan 2017 14:37:57 GMT
HTTP/1.1 201 Created
Server: nginx
Date: Wed, 11 Jan 2017 14:37:58 GMT
Range: 2214654-2952873/2952874
Connection: keep-alive
Content-Length: 23
2214654-2952873/2952874
As you can see, it's have {"result": "deprecated", "configure_delay_ms": "6500", "status": "ok"} in line. I'm trying to fix it but seem like too complicated.
That is fine response from last chunk upload.
In my case when i trying upload video i get TypeError: the JSON object must be str, not 'bytes'