[fix] engine - invidious thumbnails

pull/2759/head
jazzzooo 10 months ago committed by Markus Heiser
parent ed3819bdd5
commit 6039dbf211

@ -5,7 +5,7 @@
import time
import random
from urllib.parse import quote_plus
from urllib.parse import quote_plus, urlparse
from dateutil import parser
# about
@ -75,6 +75,11 @@ def response(resp):
else:
thumbnail = ""
# some instances return a partial thumbnail url
# we check if the url is partial, and prepend the base_url if it is
if thumbnail and not urlparse(thumbnail).netloc:
thumbnail = resp.search_params['base_url'] + thumbnail
publishedDate = parser.parse(time.ctime(result.get("published", 0)))
length = time.gmtime(result.get("lengthSeconds"))
if length.tm_hour:

Loading…
Cancel
Save