Allow crawling videos with sync_url

This commit is contained in:
I-Al-Istannen 2020-10-06 10:39:34 +02:00
parent 51a713fa04
commit c1ccb6c53e

View File

@ -245,6 +245,12 @@ class IliasCrawler:
"""
soup = self._get_page(url, {})
if soup.find(id="headerimage"):
element: bs4.Tag = soup.find(id="headerimage")
if "opencast" in element.attrs["src"].lower():
PRETTY.warning(f"Switched to crawling a video at {folder_path}")
return self._crawl_video_directory(folder_path, url)
result: List[IliasCrawlerEntry] = []
# Fetch all links and throw them to the general interpreter