mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-05-13 16:35:43 -05:00
[IG] Allow integer media IDs
This value may already be in its integer form thus it will not be necessary to parse it out of a string
This commit is contained in:
parent
6ca23ffaa4
commit
8e8dbb408f
1 changed files with 2 additions and 1 deletions
|
@ -28,7 +28,8 @@
|
|||
|
||||
def _pk_to_id(media_id):
|
||||
"""Source: https://stackoverflow.com/questions/24437823/getting-instagram-post-url-from-media-id"""
|
||||
return encode_base_n(int(media_id.split('_')[0]), table=_ENCODING_CHARS)
|
||||
pk = int(str(media_id).split('_')[0])
|
||||
return encode_base_n(pk, table=_ENCODING_CHARS)
|
||||
|
||||
|
||||
def _id_to_pk(shortcode):
|
||||
|
|
Loading…
Reference in a new issue