Private GIT

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

hot fix for ygg (#4170)

parent 8c80322f
Branches
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ class YggTorrentProvider(TorrentProvider): # pylint: disable=too-many-instance- ...@@ -48,7 +48,7 @@ class YggTorrentProvider(TorrentProvider): # pylint: disable=too-many-instance-
self.minleech = None self.minleech = None
# URLs # URLs
self.url = 'https://yggtorrent.com/' self.url = 'https://ww1.yggtorrent.com/'
self.urls = { self.urls = {
'login': urljoin(self.url, 'user/login'), 'login': urljoin(self.url, 'user/login'),
'search': urljoin(self.url, 'engine/search'), 'search': urljoin(self.url, 'engine/search'),
...@@ -122,9 +122,10 @@ class YggTorrentProvider(TorrentProvider): # pylint: disable=too-many-instance- ...@@ -122,9 +122,10 @@ class YggTorrentProvider(TorrentProvider): # pylint: disable=too-many-instance-
if len(cells) < 5: if len(cells) < 5:
continue continue
download_url = ""
title = cells[0].find('a', class_='torrent-name').get_text(strip=True) title = cells[0].find('a', class_='torrent-name').get_text(strip=True)
for download_img in cells[0].select('a[href] img'): for download_img in cells[0].select('a[href] img'):
if download_img['src'] == "https://yggtorrent.com/static/icons/icon_download.gif": if download_img['src'] == urljoin(self.url,"static/icons/icon_download.gif"):
download_url = urljoin(self.url, download_img.parent['href']) download_url = urljoin(self.url, download_img.parent['href'])
break break
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment