I am scraping Bangla text from This Website. It was working fine earlier but suddenly it is showing some random text.
Code:
from urllib.request import urlopen,Request
from lxml import html as h
req = Request('https://corona.gov.bd', headers={'User-Agent': 'Mozilla/5.0','Content-type': 'text/plain; charset=utf-8'})
html = urlopen(req)
tree = h.fromstring(html.read())
new_infected = tree.xpath(
'/html/body/section[3]/div/div[1]/div[1]/div/div[1]/div[1]/h3/b')[0].text
print(new_infected)
Output:
১৬৯৪
Expected Output:
১৬৯৪