Where do I find the Instagram media ID of a image

后端 未结 15 1370

I\'m am looking for the MediaID of an Instagram image which has been uploaded. It should look like

1234567894561231236_33215652

15条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-22 19:59

    Same thing you can implement in Python-

    import requests,json
    
    def get_media_id(media_url):
       url = 'https://api.instagram.com/oembed/?callback=&url=' + media_url
       response = requests.get(url).json()
       print(response['media_id'])
    
    get_media_id('MEDIA_URL')
    

提交回复
热议问题