This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is Python port of this Javascript method: | |
# https://github.com/notslang/instagram-id-to-url-segment/blob/master/lib/index.coffee | |
url = "https://www.instagram.com/p/B8iwlG9pXHI/" | |
# ----> use regexp to extract code from url | |
code = "B8iwlG9pXHI" | |
charmap = { | |
'A': '0', | |
'B': '1', |