Skip to content
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

[instagram] Incorrect modified date on saved videos from story/highlight/channel (videos)/reel #2395

Closed
Infinitay opened this issue Mar 13, 2022 · 3 comments

Comments

@Infinitay
Copy link
Contributor

I noticed that the Instagram module saves the metadata of a regular post correctly such as the date. For example, if a post was made on March 12th, it will correctly save the file's modified date as March 12th. This isn't the case for videos. When Instaloader is saving a video explicitly in the video tab (channel), highlight, or a story, the video's modified date will be the time it was downloaded, not posted. I'm not sure about reels but given the case for the other three scenarios, I would say it's safe to assume reels date saving is also broken.

To clarify:

  • A post would be any post on a user's main Instagram page. This includes a photo or video attached in a post. The content's (including a video) modified date matches the post/upload date.
    • https://www.instagram.com/<username>/
    • https://www.instagram.com/p/<post_id>/
  • A video would be found within the video tab or channel. The content's modified date here does not match the post/upload date.
    • https://www.instagram.com/<username>/channel/
    • https://www.instagram.com/tv/<post_id>/
  • A story would be anything posted on a user's story. The content's video modified date here does not match the post/upload date. A photo does however.
    • https://www.instagram.com/stories/<username>/<story_id>/
  • A highlight would be anything saved under a user's highlight. The content's video modified date here does not match the post/upload date. A photo does however.
    • https://www.instagram.com/stories/highlights/<highlight_id>/

Example: gallery-dl -u <username> -p <password> -o extractor.instagram.include="posts,stories,reels,highlights,channel" --verbose https://www.instagram.com/metal__koo/

gallery-dl Version: 1.20.4

@AlttiRi
Copy link

AlttiRi commented Mar 13, 2022

Some videos (the notable count) does not have Last-Modified HTTP headers.
However, a preview of a video has it.

It's possible to use for videos Last-Modified header from its preview image.
The related issue: #2135

UPD: Or just set the files' mtime by using the time from API response (date key (-K)), not from Last-Modified when the header is missed.

@mikf
Copy link
Owner

mikf commented Mar 14, 2022

UPD: Or just set the files' mtime by using the time from API response (date key (-K)), not from Last-Modified when the header is missed.

There's an mtime post processor that can do that (--mtime-from-date)

@Infinitay
Copy link
Contributor Author

Thank you both for the replies

There's an mtime post processor that can do that (--mtime-from-date)

Is there a reason this isn't default for this situation on Instagram for the sources of content that don't return Last-Modified headers?

Also, is the given mtime post processor not meant to be used all the time? I'm asking because I don't see it listed within the configuration options supplied at https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants