【发布时间】:2021-03-08 21:18:57
【问题描述】:
我想通过使用 python(如果可能的话,通过 Beautifulsoup)将像 {% load static %} 这样的字符串插入现有 html 文件的第一行(在最顶部)。所以从这里:
<!DOCTYPE html>
<html>
<body>
</body>
</html>
我希望结果是这样的。所以我可以运行 python 脚本并将这一行插入到我拥有的所有现有 html 文件中。
{% load static %}
<!DOCTYPE html>
<html>
<body>
</body>
</html>
【问题讨论】:
标签: javascript python html css beautifulsoup