You can pass in a string or an open filehandle: from bs4 import BeautifulSoup with open("index.html") as fp: soup = BeautifulSoup(fp, 'html.parser') soup ...
確定! 回上一頁