@@ -73,18 +73,18 @@ def get_webpage(self) -> str:
73
73
while True :
74
74
try : # if electricity goes out, and internet is not available for the time
75
75
html_page = requests .get (self .get_url (), verify = self .verifySSL ).text
76
- except ConnectionError :
77
- self .logger .critical ("ConnectionError! Internet or Electricity has probably gone out for a while. "
78
- "Retrying in 1minute..." )
79
- sleep (60 )
80
- continue
81
76
except requests .exceptions .SSLError as error :
82
77
print (error )
83
78
self .logger .critical ("Looks like, requests is having problems with SSL for this website.\n "
84
79
"Try adding 'false' in the 4th column in csv file for this webpage"
85
80
"(Refer \" README How To Run\" 1st bullet point)" )
86
81
# TODO: skip the current wbsite instead of quitting program.
87
82
quit ()
83
+ except requests .exceptions .ConnectionError :
84
+ self .logger .critical ("ConnectionError! Internet or Electricity has probably gone out for a while. "
85
+ "Retrying in 1minute..." )
86
+ sleep (60 )
87
+ continue
88
88
89
89
if len (html_page ) == 0 :
90
90
self .logger .warning (f" received webpage for \" { self .get_name ()} \" of size 0! Retrying... " )
@@ -146,7 +146,7 @@ def set_verifySSL(self, value: str):
146
146
self .verifySSL = False
147
147
self .logger .warning ("SSL verification has been disabled for this website." )
148
148
else :
149
- self .verifySSL = value
149
+ self .verifySSL = True
150
150
151
151
# ==========================================
152
152
## Other Functions
@@ -330,7 +330,7 @@ def filter_DiffOutput(output):
330
330
:param output: the output received from diff command
331
331
:return: list, a list of both code files. eg: [(code1, code2), (code1, code2)]
332
332
"""
333
- line_regex = re .compile (r'^\d+c\d+|\n\d+c\d+' ) # Regex to match 634c634 stuff to split the output
333
+ line_regex = re .compile (r'^\d+(?:,\d+)? c\d+(?:,\d+)? |\n\d+(?:,\d+)? c\d+(?:,\d+)? ' ) # Regex to match 634c634 stuff to split the output
334
334
strip_punc = ' <>\n \t !@#$%^&*()\\ []{};:\' ""?/`~=+-_'
335
335
changes = line_regex .split (output )[1 :] # since 0th element is ''
336
336
changes = [tuple (i .split ('\n ---\n ' )) for i in changes ]
0 commit comments