import requests
from bs4 import BeautifulSoup
def getdata(url):
r = requests.get(url)
return r.text
htmldata = getdata("https://barcindia.co.in/data-insights")
soup = BeautifulSoup(htmldata, 'html.parser')
data = ''
for i in soup.find_all('tbody'):
data = data + (i.get_text())
data
data = ''.join((filter(lambda i: i not in ['\t'], data)))
print(data)
No comments:
Post a Comment