如何使用python dominate声明元数据标签

时间:2017-10-03 01:10:08

标签: python refresh http-equiv dominate

import dominate
from dominate import tags as tags

doc = dominate.document(title="Monitormaneto Data Center EOSP")
with doc:
    tags.meta(<meta http-equiv="refresh" content="30; URL="domain.url")
    tags.style("body{font-family:Helvetica}")
    ...

1 个答案:

答案 0 :(得分:0)

考虑修改代码中传递给tags.meta()的参数:

import dominate
from dominate import tags as tags

doc = dominate.document(title="Monitormaneto Data Center EOSP")
with doc:
    # tags.meta(<meta http-equiv="refresh" content="30; URL="domain.url")
    tags.meta(http_equiv="refresh", content="30; URL=domain.url")
    tags.style("body{font-family:Helvetica}")