1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-03-09 12:50:23 -05:00

revert _id_to_pk change

Authored by: bashonly
This commit is contained in:
bashonly 2025-02-23 01:36:21 -06:00
parent b2c11e33f4
commit aa6d9c5fe3
No known key found for this signature in database
GPG key ID: 783F096F253D15B0

View file

@ -33,10 +33,8 @@ def _pk_to_id(media_id):
def _id_to_pk(shortcode): def _id_to_pk(shortcode):
"""Convert a shortcode to a numeric value""" """Covert a shortcode to a numeric value"""
if len(shortcode) > 28: return decode_base_n(shortcode[:11], table=_ENCODING_CHARS)
shortcode = shortcode[:-28]
return decode_base_n(shortcode, table=_ENCODING_CHARS)
class InstagramBaseIE(InfoExtractor): class InstagramBaseIE(InfoExtractor):