diff options
author | bashonly <88596187+bashonly@users.noreply.github.com> | 2025-02-23 02:31:00 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-23 08:31:00 +0000 |
commit | a59abe0636dc49b22a67246afe35613571b86f05 (patch) | |
tree | 8a11ef88e5d1a78e61d2d5fb0eb1a164dfcd662f | |
parent | a90641c8363fa0c10800b36eb6b01ee22d3a9409 (diff) |
[ie/instagram] Fix extraction of older private posts (#12451)
Authored by: bashonly
-rw-r--r-- | yt_dlp/extractor/instagram.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/yt_dlp/extractor/instagram.py b/yt_dlp/extractor/instagram.py index 3d4055012..94a685cd8 100644 --- a/yt_dlp/extractor/instagram.py +++ b/yt_dlp/extractor/instagram.py @@ -33,8 +33,10 @@ def _pk_to_id(media_id): def _id_to_pk(shortcode): - """Covert a shortcode to a numeric value""" - return decode_base_n(shortcode[:11], table=_ENCODING_CHARS) + """Convert a shortcode to a numeric value""" + if len(shortcode) > 28: + shortcode = shortcode[:-28] + return decode_base_n(shortcode, table=_ENCODING_CHARS) class InstagramBaseIE(InfoExtractor): |