DoD Contracts, Maps and Austria

This commit is contained in:
2026-02-19 22:49:47 -05:00
parent 3c4a41ae2c
commit 3eda7647e9
13 changed files with 469 additions and 38 deletions

View File

@@ -26,8 +26,8 @@ venue, created = Organization.objects.get_or_create(
scraper,item_count_start, virtcal = digitools.getScraper(venue, venue.website, 'msp')
tz_str = " -0600 UTC"
DATETIME_FORMAT = '%a %B %d @ %I:%M %p %Y %z %Z'
DATETIME_FORMAT_2 = '%a %B %d, %Y @ %I:%M %p %z %Z'
DATETIME_FORMAT = '%a %B %d @ %I:%M %p %Y %z %Z'
DATETIME_FORMAT_2 = '%a %B %d @ %I:%M %p %Y %z %Z'
calendar_url = 'https://noboolpresents.com/venues/uptown-vfw/'
current_year = str(datetime.now().year)
@@ -50,32 +50,33 @@ def getEvents(br):
title = event.xpath('.//*/h2[@class="alt-font"]/a/text()')[0].replace("\n", "").replace("\t", "")
link = event.xpath('.//*/h2[@class="alt-font"]/a/@href')[0]
try:
print("First Try", dateTime)
new_event, created = Event.objects.update_or_create(
scraper = scraper,
event_type = 'Mu',
show_title = title,
show_link = link,
show_date = datetime.strptime(dateTime + tz_str, DATETIME_FORMAT),
show_day = datetime.strptime(dateTime + tz_str, DATETIME_FORMAT),
venue = venue
)
digitools.add_calendar(new_event, 'msp')
scraper.items+=1
except Exception as e:
try:
print("New Try", dateTime)
new_event, created = Event.objects.update_or_create(
scraper = scraper,
event_type = 'Mu',
show_title = title,
show_link = link,
show_date = datetime.strptime(dateTime[:-4].strip() + tz_str, DATETIME_FORMAT_2),
show_day = datetime.strptime(dateTime[:-4].strip() + tz_str, DATETIME_FORMAT_2),
show_date = datetime.strptime(dateTime.strip() + tz_str, DATETIME_FORMAT_2),
venue = venue
)
digitools.add_calendar(new_event, 'msp')
scraper.items+=1
except Exception as e:
print("oops", e, dateTime[:-4])
print("oops", e)
ppr(event)
getEvents(br)
br.find_element(By.XPATH, './/*/li[@class="tribe-events-c-nav__list-item tribe-events-c-nav__list-item--next"]/a').click()