Skip to content

Commit 8780352

Browse files
committed
更新html工具
1 parent 8216110 commit 8780352

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

tools/html.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,17 @@ def replace_file_html(file_path, reg_rule=None):
8080
reg_rule_html = [
8181
(r'<a href="http://(.*?)"', '<a href="#"'),
8282
(r'<a target="_blank" href="http://(.*?)"', '<a target="_blank" href="#"'),
83+
(r'<a style="width:56px;" href="http://(.*?).shtml"', '<a style="width:56px;" href="#"'),
8384
(r'(\s*)onClick="analytical((.*?))"', ''),
8485
# (r'(\n){2,}', '\n'), # 这种不能去除空格组成的行
8586
(r'(\n[\s|\r]*\n)', '\n'), # 贪婪匹配,去除多余换行和无意义空行
8687
]
87-
test_file_path = '/home/zhanghe/code/php/secoo/app/views/partials/container/floor.volt'
88+
# test_file_path = '/home/zhanghe/code/php/secoo/app/views/partials/container/slider.volt'
89+
test_file_path = '/home/zhanghe/code/php/secoo/app/views/partials/head.volt'
8890
replace_file_html(test_file_path, reg_rule_html)
91+
92+
93+
'''
94+
这个工具可以做为仿站辅助工具
95+
下一步做个获取页面图片的辅助工具配合使用
96+
'''

0 commit comments

Comments
 (0)