Check url endings

merge-requests/30/head
Bob Mottram 2022-07-03 10:52:55 +01:00
parent 7f97758173
commit e624d00cd9
1 changed files with 6 additions and 2 deletions

View File

@ -211,8 +211,12 @@ def _add_embedded_video_from_sites(translate: {}, content: str,
if '"' not in url: if '"' not in url:
continue continue
url = url.split('"')[0] url = url.split('"')[0]
if ('/trending', '/home', '/overview', if url.endswith('/trending') or \
'/recently-added', '/local') in url: url.endswith('/home') or \
url.endswith('/overview') or \
url.endswith('/recently-added') or \
url.endswith('/local') or \
url.endswith('/about'):
# ignore various peertube endpoints # ignore various peertube endpoints
continue continue
if '/c/' in url: if '/c/' in url: