php-snapchat
php-snapchat copied to clipboard
No data for video with text
When downloading a video with text, no data is returned. The test was done on a iPhone 4.
Having the same issue. Seems to not be passing the isMedia check. If i just set return TRUE at the top of that function it downloads data but not in a valid format.
My guess is that the different Snapchat versions have different hash/encryption keys, so we would need to work out what those are, however...
My fix, in snapchat_agent.php:
- Change the version back to 6.0.2
14: const VERSION = '6.0.2';
56: CURLOPT_USERAGENT => 'Snapchat/6.0.2 (iPhone6,2; iOS 7.0.4; gzip)',
- Comment out sending version (or delete the line):
235: //$data['version'] = self::VERSION;
This was found by trial and error from the login issue, so thanks to NemOry and shgn.
That works.
But then causes the login issues experienced previously. Random get on non member for the cache
If you have changed all 3 lines, then I am unsure why it is not working for you. In my tests (reading the feed and getting media) it all works fine. You did comment/remove line 235? That is what cured the login issue for me as per shgn suggestion in the other issue.
the three line changes seemed to work for me, but I sometimes have to rerun the downloads a few times to get everything.
I submitted a pull request dealing with this issue. Videos with overlay texts are sent as a zip file containing a transparent PNG (with the text), and the M4V file.
The changes include:
- Adding an isCompressed method to check after the media checks have failed.
- Adding unCompress (you can rename to extract if you prefer), that would extract the files, and returns an array consisting of two key-value pair elements. Key would be the filename and value is the content of the file.
Check pull request for more details.