Private GIT

Skip to content
Snippets Groups Projects
Commit b3013b93 authored by PHD's avatar PHD Committed by miigotu
Browse files

Quick fix due to the change of the site yggtorrent (#4154)

* Quick fix due to the change of the site yggtorrent

* Update yggtorrent.py

Break for if url found
parent 2e5997cc
Branches
No related tags found
No related merge requests found
...@@ -123,7 +123,11 @@ class YggTorrentProvider(TorrentProvider): # pylint: disable=too-many-instance- ...@@ -123,7 +123,11 @@ class YggTorrentProvider(TorrentProvider): # pylint: disable=too-many-instance-
continue continue
title = cells[0].find('a', class_='torrent-name').get_text(strip=True) title = cells[0].find('a', class_='torrent-name').get_text(strip=True)
download_url = urljoin(self.url, cells[0].find('a', target='_blank')['href']) for download_img in cells[0].select('a[href] img'):
if download_img['src'] == "https://yggtorrent.com/static/icons/icon_download.gif":
download_url = urljoin(self.url, download_img.parent['href'])
break
if not (title and download_url): if not (title and download_url):
continue continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment