Skip to content
This repository has been archived by the owner on Feb 22, 2025. It is now read-only.

Commit

Permalink
Merge pull request #818 from rix1337/dev
Browse files Browse the repository at this point in the history
SF Bugfix: Improve download link fallback handling
  • Loading branch information
rix1337 authored Jan 4, 2025
2 parents 38994d4 + 413f6f1 commit 77f508f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
24 changes: 20 additions & 4 deletions feedcrawler/external_sites/feed_search/sites/content_shows_sf.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,28 @@ def sf_parse_download(self, series_url, title, language_id):
pass

links = release_info.findAll("div", {'class': 'row'})[1].findAll('a')

download_link = False
for link in links:
if check_hoster(link.text.replace('\n', '')):
download_link = "https://" + self.url + link['href']
break
if not download_link and not self.hoster_fallback:
hoster_name = link.text.replace('\n', '')
if hoster_name:
if check_hoster(hoster_name):
download_link = "https://" + self.url + link['href']
break
else:
if self.hoster_fallback:
download_link = "https://" + self.url + link['href']
shared_state.logger.debug(f"Hoster-Beschriftung der Links fehlt für {title}, falle auf Link zurück: {download_link}")
break

if not download_link and self.hoster_fallback:
try:
download_link = "https://" + self.url + links[0]['href']
shared_state.logger.debug(f"Kein passender Link für {title} gefunden, falle auf ersten Link zurück: {download_link}")
except:
shared_state.logger.debug(f"Kein passender Link für {title} gefunden - auch mit Fallback!")

if not download_link:
storage = self.db.retrieve_all(title)
if 'added' not in storage and 'notdl' not in storage:
wrong_hoster = '[SF/Hoster fehlt] - ' + title
Expand Down
2 changes: 1 addition & 1 deletion feedcrawler/providers/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


def get_version():
return "21.0.3"
return "21.0.4"


def create_version_file():
Expand Down
4 changes: 2 additions & 2 deletions feedcrawler/web_interface/vuejs_frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion feedcrawler/web_interface/vuejs_frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "feedcrawler-web",
"version": "21.0.3",
"version": "21.0.4",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down

0 comments on commit 77f508f

Please sign in to comment.