[英]how to send data from HTML to python and get the result back to HTML?
[英]How to get data from html with Python
你可以試試html2text和BeautifulSoup 之類的工具
我知道在 html 中使用正則表達式可能不是最好的方法,但您可以這樣做:
import re
code_search = re.search('>\n?" Security code: "\n?<[^<>]+>\n?(\d*)\n?<', html)
if code_search:
print(code_search.group(1))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.