Created
October 2, 2018 05:05
-
-
Save vishal2612200/bcb3985ecd5566365e901a0966dc1327 to your computer and use it in GitHub Desktop.
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
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
import requests | |
page=urlopen("https://www.cardekho.com/") | |
soup = BeautifulSoup(page.read(),"html5lib") | |
new =soup.find_all("div",{"class":"price"}) | |
len(new) #to count the number of price class element i.e testing purpose | |
print(new[0].text)#for testing the link | |
about=new[0] | |
for about in new: | |
print(about.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment