Fixes broadcast tests
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
''' bring connectors into the namespace '''
|
||||
from .settings import CONNECTORS
|
||||
from .abstract_connector import ConnectorException
|
||||
from .abstract_connector import get_data, get_image
|
||||
|
@ -318,6 +318,17 @@ def get_data(url):
|
||||
return data
|
||||
|
||||
|
||||
def get_image(url):
|
||||
''' wrapper for requesting an image '''
|
||||
try:
|
||||
resp = requests.get(url)
|
||||
except RequestError:
|
||||
return None
|
||||
if not resp.ok:
|
||||
return None
|
||||
return resp
|
||||
|
||||
|
||||
@dataclass
|
||||
class SearchResult:
|
||||
''' standardized search result object '''
|
||||
|
Reference in New Issue
Block a user