From c1ccb6c53ee27af2587bf4918e764ffe268bbb58 Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Tue, 6 Oct 2020 10:39:34 +0200 Subject: [PATCH] Allow crawling videos with sync_url --- PFERD/ilias/crawler.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PFERD/ilias/crawler.py b/PFERD/ilias/crawler.py index a10db3d..ca00771 100644 --- a/PFERD/ilias/crawler.py +++ b/PFERD/ilias/crawler.py @@ -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