Skip to content

Commit 8a9cfb3

Browse files
get HDTVRip if 720p dosnt exist
1 parent 04d34bd commit 8a9cfb3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clients/lostfilm_client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ def tag_with_720p_link(tag):
6666
return tag.name == 'a' and tag.has_attr('href') and '720p' in tag.text
6767

6868

69+
def tag_with_HDTVRip_link(tag):
70+
return tag.name == 'a' and tag.has_attr('href') and 'HDTVRip' in tag.text
71+
72+
6973
def get_redirect_url(torrent_mirror, series_id, lostfilm_lf_session, proxies):
7074
torrent_page = torrent_mirror + '/v_search.php?a=' + series_id
7175
cookies = {'lf_session': lostfilm_lf_session}
@@ -82,6 +86,8 @@ def get_torrent_url(redirect_url, proxies):
8286
item = soup.find(tag_with_1080p_link)
8387
if item is None:
8488
item = soup.find(tag_with_720p_link)
89+
if item is None:
90+
item = soup.find(tag_with_HDTVRip_link)
8591
torrent_url = item.attrs['href']
8692

8793
return torrent_url

0 commit comments

Comments
 (0)