Answer the question
In order to leave comments, you need to log in
Libraries for working with instagram in Python?
Hello!
I want to parse photos from instagram from any link, as it turned out, ordinary BeautifulSoup is not enough, can someone suggest some libraries for this?
Answer the question
In order to leave comments, you need to log in
Library - InstaPy.
I do not know why BS did not please the truth.
import requests
import re
post_url = 'https://www.instagram.com/p/CBaXWGThA3s'
r = requests.get(post_url)
image_url = re.search(r'display_url":"(.+?)"', r.text).group(1).replace(r'\u0026', '&')
print(image_url)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question