I want to get a list of urls for posts from this page and get wanted data from each of them...
import requests
from bs4 import BeautifulSoup
import selenium.webdriver as webdriver
url = 'https://www.instagram.com/louisvuitton/'
driver = webdriver.Firefox()
driver.get(url)
soup = BeautifulSoup(driver.page_source, 'lxml')
data1 = soup.find_all('div', {'class': '_cmdpi'})
list1 =[]
for links in data1:
list1.append(links.a['href'])
print list1
But why is this getting only the first link rather than a list?