Skip to content

Commit de619c8

Browse files
Update lostfilm client add DVDRip Link
1 parent 221aefa commit de619c8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clients/lostfilm_client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ def tag_with_WEBDLRip_link(tag):
7474
return tag.name == 'a' and tag.has_attr('href') and 'WEB-DLRip' in tag.text
7575

7676

77+
def tag_with_DVDRip_link(tag):
78+
return tag.name == 'a' and tag.has_attr('href') and 'DVD-Rip' in tag.text
79+
80+
7781
def get_redirect_url(torrent_mirror, series_id, lostfilm_lf_session, proxies):
7882
torrent_page = torrent_mirror + '/v_search.php?a=' + series_id
7983
cookies = {'lf_session': lostfilm_lf_session}
@@ -94,6 +98,10 @@ def get_torrent_url(redirect_url, proxies):
9498
item = soup.find(tag_with_HDTVRip_link)
9599
if item is None:
96100
item = soup.find(tag_with_WEBDLRip_link)
101+
if item is None:
102+
item = soup.find(tag_with_DVDRip_link)
103+
if item is None:
104+
item = soup.find('div', {'class': 'inner-box--link main'}).find('a')
97105
torrent_url = item.attrs['href']
98106

99107
return torrent_url

0 commit comments

Comments
 (0)