Skip to content Skip to sidebar Skip to footer

Why I'm Not Getting Complete Div In Beautifulsoup Python?

My code import requests from bs4 import BeautifulSoup URL = 'https://www.quora.com/profile/Siddhartha-gaur-5' r = requests.get(URL) soup = BeautifulSoup(r.content,'html5lib') fo

Solution 1:

Here is the code that work

import requests
from bs4 import BeautifulSoup
from selenium import webdriver
# MAIN
driver = webdriver.Chrome('cromedriver path here')
driver.maximize_window()


#Go to link
URL = "https://www.quora.com/profile/Siddhartha-gaur-5"
driver.get(URL)

soup = BeautifulSoup(driver.page_source,'lxml')
driver.close()

for data in soup.find("div", id="root"): 
    print(data)

Post a Comment for "Why I'm Not Getting Complete Div In Beautifulsoup Python?"