From aa6d9c5fe3afedbf843d35a3d855189481ec9479 Mon Sep 17 00:00:00 2001 From: bashonly Date: Sun, 23 Feb 2025 01:36:21 -0600 Subject: [PATCH] revert `_id_to_pk` change Authored by: bashonly --- yt_dlp/extractor/instagram.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/yt_dlp/extractor/instagram.py b/yt_dlp/extractor/instagram.py index 94a685cd8..3d4055012 100644 --- a/yt_dlp/extractor/instagram.py +++ b/yt_dlp/extractor/instagram.py @@ -33,10 +33,8 @@ def _pk_to_id(media_id): def _id_to_pk(shortcode): - """Convert a shortcode to a numeric value""" - if len(shortcode) > 28: - shortcode = shortcode[:-28] - return decode_base_n(shortcode, table=_ENCODING_CHARS) + """Covert a shortcode to a numeric value""" + return decode_base_n(shortcode[:11], table=_ENCODING_CHARS) class InstagramBaseIE(InfoExtractor):