-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_team_file.py
More file actions
30 lines (23 loc) · 992 Bytes
/
check_team_file.py
File metadata and controls
30 lines (23 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Suspicion: User is viewing `team.html`, not `index.html`.
# I will check if `team.html` exists and has the slider code.
import os
if os.path.exists('team.html'):
print("Found team.html. Reading content...")
with open('team.html', 'r', encoding='utf-8') as f:
html = f.read()
if 'swiper-container' in html:
print("team.html contains Swiper code.")
# check if it has the old width
if 'width: 279px' in html:
print("team.html HAS the old 279px width restriction!")
else:
print("team.html does not have 279px width (maybe clean?).")
# Check if it has my new quote injection?
if 'team-quote' in html:
print("team.html HAS quotes code.")
else:
print("team.html MISSING quotes code (So my previous scripts didn't touch it!)")
else:
print("team.html does NOT contain Swiper code.")
else:
print("team.html does not exist.")