简体   繁体   中英

Scraping a website with Python, edit the HTML and then re-open the url with the edited html

I was wondering if there is a way to scrape a website using Python, then I can do some changes in the HTML or the scraped data (for example change the font color or background color..etc) and then open the edited HTML in the browser.

I was able to get the URL and edit the data using requests and BeautifulSoup, but then I got stuck on how to re-open the HTML file in the browser.

This is my code:

在此处输入图片说明

So now I got the whole html data in the variable lime_changed but am stuck on how to re-open it, can someone help me with this one.

根据您的目标,您还可以使用 Selenium 从 Python 自动控制浏览器👍

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM