mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Download cty.plist separately so errors can be better handled
This commit is contained in:
@@ -6,6 +6,7 @@ from time import sleep
|
||||
import pytz
|
||||
import requests
|
||||
|
||||
from core.constants import HTTP_HEADERS
|
||||
from spotproviders.spot_provider import SpotProvider
|
||||
|
||||
|
||||
@@ -35,7 +36,7 @@ class HTTPSpotProvider(SpotProvider):
|
||||
try:
|
||||
# Request data from API
|
||||
logging.debug("Polling " + self.name + " spot API...")
|
||||
http_response = requests.get(self.url, headers=self.HTTP_HEADERS)
|
||||
http_response = requests.get(self.url, headers=HTTP_HEADERS)
|
||||
# Pass off to the subclass for processing
|
||||
new_spots = self.http_response_to_spots(http_response)
|
||||
# Submit the new spots for processing. There might not be any spots for the less popular programs.
|
||||
|
||||
Reference in New Issue
Block a user