-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get higher video and StoryItem image quality if logged-in #712
Conversation
A note/caveat: iPhone ones always have equal or higher resolution AFAIK. But when the resolution is the same, the two files are different and while the difference is minimal, iPhone one likely would have lower bit-rate. So, we can further improve it by comparing dimensions first (but I don't know if it's easy to get the dimensions of video of the web version). |
I tried this out with the IGTV posts from |
I will look into it. In the meantime, I noticed that 610b624 doesn't seem to fetch high resolution image for stories either. We may want to check that too. |
Thanks!
Yes, that commit only addresses the quality of Posts, not of StoryItems. |
Hi, finally have some time to check this (sorry!). I found out that it's the UA we're using The author of MaxURL (@qsniyg) also told me they block requests from older versions of the client, so maybe it's not iPhone that is an issue but its version just being too old. I haven't find any side-effect of this change yet, should we just swap this new UA in? |
And I honestly don't know how to get the current iPhone UA either as I don't have any iOS devices. So if you can help test on that it would be very appreciated too! |
dcd4a12
to
0b0c63e
Compare
On an unrelated note, I guess it's impossible to |
Good call! I found out that just taking the Android Instagram version number and leaving the rest as is also works, i.e.
This user agent is mostly of a trial-and-error origin. I just did some tests with the "new" Instagram 146 iPhone agent and it seems to work fine :)
Rebasing is fine. Actually I prefer rebasing, it produces a cleaner history than merging. |
Thanks for the suggestion, I've changed that. I think that's all I have for this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I rebased it once again to current master and tested it and I can confirm that it works fine and downloads higher-resolution StoryItem pictures and Post videos that have a higher-resolution while having a lower bit rate. Also, I tested all other functions that use the iPhone endpoint and they still work perfectly.
One thing that needs to be addressed though is that StoryItem.__init__
loads the iphone_struct
from node['iphone_struct']
, but StoryItem._asdict()
does not yet put it there.
Thanks! Merged into upcoming/v4.6. |
Do you need to add anything except --stories to make this work when running on the win10 standalone? |
It should automatically retrieve the best available quality if logged-in
The change is included since version 4.6a1. |
Similar to 610b624, this commit tires to get highest quality of video from iPhone API.