Quellcode durchsuchen

Dtabase stores date object. Comapare dates with strftime

Foppe Hemminga vor 6 Jahren
Ursprung
Commit
eb35e776ae
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      _bs.py

+ 1 - 1
_bs.py

@@ -83,7 +83,6 @@ def get_meta_data(this_data, this_venue):
     :param this_venue:
     :return:
     """
-    global print_it
     this_soup = BeautifulSoup(this_data, 'html.parser')
     early = this_soup.select('div.large')
     # if early:
@@ -153,6 +152,7 @@ def scrape_scratchings(div, this_venue):
                 print('The start of the offending line is: {}'.format(text[0:10]))
                 continue
             text = re.sub(r'e\s+', ' ', text)
+            text = re.sub(r'\s+', ' ', text)  # Kills tabs between number and name of horse
             temp_list = Scratching(this_venue.name, this_venue.state, this_venue.date, race, text)
             scraped_scratchings.append(temp_list)
     return scraped_scratchings