Kaynağa Gözat

Prevent double message

Foppe Hemminga 6 yıl önce
ebeveyn
işleme
89840f48bb
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 2 0
      _bs.py

+ 2 - 0
_bs.py

@@ -175,6 +175,8 @@ def process_scratchings(this_data, this_venue):
     div = header.findNext('table')
     late_scratchings = scrape_scratchings(div, this_venue)
     scratchings = early_scratchings + late_scratchings
+    # Make sure the scratchings list contains distinct entries
+    scratchings = list(set(scratchings))
     # assert len(scratchings) == int(scratchings_count), 'len(scratchings) {} == scratchings_count {}'.format(
     #     len(scratchings), scratchings_count)
     # pprint(scratchings)