Foppe Hemminga 6 лет назад
Родитель
Сommit
9e13d8b8d4
1 измененных файлов с 13 добавлено и 6 удалено
  1. 13 6
      _bs.py

+ 13 - 6
_bs.py

@@ -114,16 +114,23 @@ def get_meta_data(this_data, this_venue):
             # print(times[1])
         match = close_regex.search(this_meta_data)
         if match:
-            print('match.group(1): {}'.format(match.group(1)))
+            print_it = False
+            if '-19 ' not in match.group(1):
+                print_it = True
+            if print_it:
+                print('match.group(1): {}'.format(match.group(1)))
             times[2] = match.group(1)[:-5]
             l_time = datetime.datetime.strptime(times[2], time_format)
-            print('l_time: {}'.format(l_time))
-            print('aest.localize(l_time); {}'.format(aest.localize(l_time)))
+            if print_it:
+                print('l_time: {}'.format(l_time))
+                print('aest.localize(l_time); {}'.format(aest.localize(l_time)))
             times[3] = model.convert_to_unixtime(aest.localize(l_time))
-            print('times[3]: {}'.format(times[3]))
+            if print_it:
+                print('times[3]: {}'.format(times[3]))
             # print(times[3])
-            print('datetime.date.fromtimestamp(times[3]+12*60*60): {}'.format(
-                datetime.date.fromtimestamp(times[3]+12*60*60)))
+            if print_it:
+                print('datetime.date.fromtimestamp(times[3]+12*60*60): {}'.format(
+                    datetime.date.fromtimestamp(times[3]+12*60*60)))
     # The RaceDAy namedTuple is created and filled
     race_day = RaceDay(this_venue.state, this_venue.name, this_venue.date_string,
                        datetime.date.fromtimestamp(times[3]+12*60*60),