Skip to content

Instantly share code, notes, and snippets.

@SpikeVN
Created June 6, 2023 05:03
Show Gist options
  • Save SpikeVN/170978bad6934d6f777d49feaf149419 to your computer and use it in GitHub Desktop.
Save SpikeVN/170978bad6934d6f777d49feaf149419 to your computer and use it in GitHub Desktop.
import requests
import bs4
URL = "https://www.nchmf.gov.vn/kttv/"
html = requests.get(URL).text
document = bs4.BeautifulSoup(html, 'html.parser')
target = document.select(".wt-city")
target = target[0]
target = target.findAll("li")
result = {}
for entry in target:
result[entry.find("a").getText()] = entry.findAll("div")[1].getText()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment