Generation

generate functionTue, 02 May 2023

use BeautifulSoup read a html file

import beautifulsoup4 def read_html(file): f = open(file) html = f.read() soup = BeautifulSoup(html, 'html.parser') return soup read_html("test.html")

Questions about programming?Chat with your personal AI assistant