Skip to content

Commit 096b4c4

Browse files
committed
edits
1 parent 8375485 commit 096b4c4

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

run.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ def main(args):
4949

5050
for url, opt in tqdm(roster.items(), desc="Checking URLs"):
5151
out_dir = join(
52-
args.tmp_dir,
53-
url.replace('/', '_').replace('?', '_').replace('&', '_'),
54-
).rstrip('/')
52+
args.tmp_dir, replace_special_char(url)).rstrip('/')
5553

5654
# Take screenshots
5755
screenshot(url, out_dir, opt)
@@ -132,5 +130,10 @@ def load_roster(roster_json):
132130
return roster
133131

134132

133+
def replace_special_char(url):
134+
return url.replace(
135+
'/', '_').replace('?', '_').replace('&', '_').replace(':', '_')
136+
137+
135138
if __name__ == '__main__':
136139
main(parser.parse_args())

util.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,7 @@ def email_myself(
4343
to_emails = [email]
4444
from_email = email
4545

46-
msg="""\
47-
<html>
48-
<head></head>
49-
<body>
50-
<p>Hi!<br>
51-
How are you?<br>
52-
Here is the <a href="https://www.python.org">link</a> you wanted.
53-
</p>
54-
</body>
55-
</html>
56-
"""
57-
msg = MIMEText(msg,'html')
46+
msg = MIMEText(msg)
5847
msg['Subject'] = subject
5948
msg['To'] = ', '.join(to_emails)
6049
msg['From'] = from_email

0 commit comments

Comments
 (0)