mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-09 03:04:54 -04:00
Allow schema to give images as dict (#859)
This commit is contained in:
parent
8154ee548a
commit
00bc9a15ec
@ -54,6 +54,8 @@ def scrape_image(image_url: str, slug: str) -> Path:
|
|||||||
|
|
||||||
all_image_requests = []
|
all_image_requests = []
|
||||||
for url in image_url:
|
for url in image_url:
|
||||||
|
if isinstance(url, dict):
|
||||||
|
url = url.get('url', "")
|
||||||
try:
|
try:
|
||||||
r = requests.get(url, stream=True, headers={"User-Agent": _FIREFOX_UA})
|
r = requests.get(url, stream=True, headers={"User-Agent": _FIREFOX_UA})
|
||||||
except Exception:
|
except Exception:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user