Skip to content

Instantly share code, notes, and snippets.

View vipygt's full-sized avatar

vipygt

View GitHub Profile
# -*- coding: UTF-8 -*-
# !/usr/bin/python
# read content from the html file
file = open('/Users/marco/PycharmProjects/StyleReplace/wechat.html' ,'r')
str = file.read()
# replace head 2 label
h2Start = '''<p style="line-height: 25.6px; max-width: 100%; min-height: 1em; white-space: pre-wrap; color: rgb(62, 62, 62); background-color: rgb(255, 255, 255); box-sizing: border-box !important; word-wrap: break-word !important;"><strong style="max-width: 100%; color: rgb(41, 148, 128); line-height: 25.6px; box-sizing: border-box !important; word-wrap: break-word !important;"></strong></p>
<p style="max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><strong style="max-width: 100%; color: rgb(41, 148, 128); line-height: 25.6px; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="max-width: 100%; font-size: 24px; box-sizing: border-box !important; word-wrap: break-word !important;"> ''';