Commit 7a20aeac authored by echel0n's avatar echel0n
Browse files

Fixed issue with TorrentLeech logins

parent 37896dd2
...@@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least ...@@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found. the "copyright" line and a pointer to where the full notice is found.
The ultimate PVR application that downloads and manages your TV shows The ultimate PVR application that downloads and manages your TV shows
Copyright (C) 2010 - echel0n Copyright (C) 2014 - echel0n
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. ...@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode: notice like this when it starts in an interactive mode:
SiCKRAGE - Copyright (C) 2010 - echel0n SiCKRAGE - Copyright (C) 2014 - echel0n
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details. under certain conditions; type `show c' for details.
......
# Changelog # Changelog
- * 9ca359a - 2018-10-08: Release v9.3.80 - * 414a1aa - 2018-10-09: Fixed issue with TorrentLeech logins
- * a9e7913 - 2018-10-08: Release v9.3.80
- * 615cf7d - 2018-10-08: Pre-Release v9.3.80.dev6 - * 615cf7d - 2018-10-08: Pre-Release v9.3.80.dev6
- * fabc483 - 2018-10-08: Added web session hook to handle redirects when doing posts. Fixed issues with getting search results from YGGTorrent provider. - * fabc483 - 2018-10-08: Added web session hook to handle redirects when doing posts. Fixed issues with getting search results from YGGTorrent provider.
- * f64a196 - 2018-10-08: Pre-Release v9.3.80.dev5 - * f64a196 - 2018-10-08: Pre-Release v9.3.80.dev5
......
...@@ -20,6 +20,8 @@ from __future__ import unicode_literals ...@@ -20,6 +20,8 @@ from __future__ import unicode_literals
from urlparse import urljoin from urlparse import urljoin
from requests.utils import dict_from_cookiejar
import sickrage import sickrage
from sickrage.core.caches.tv_cache import TVCache from sickrage.core.caches.tv_cache import TVCache
from sickrage.core.helpers import bs4_parser, convert_size, try_int from sickrage.core.helpers import bs4_parser, convert_size, try_int
...@@ -38,8 +40,8 @@ class TorrentLeechProvider(TorrentProvider): ...@@ -38,8 +40,8 @@ class TorrentLeechProvider(TorrentProvider):
self.username = None self.username = None
self.password = None self.password = None
self.enable_cookies = True # self.enable_cookies = True
self.required_cookies = ('tluid', 'tlpass') # self.required_cookies = ('tluid', 'tlpass')
self.minseed = None self.minseed = None
self.minleech = None self.minleech = None
...@@ -48,32 +50,32 @@ class TorrentLeechProvider(TorrentProvider): ...@@ -48,32 +50,32 @@ class TorrentLeechProvider(TorrentProvider):
self.cache = TVCache(self, min_time=20) self.cache = TVCache(self, min_time=20)
def login(self):
return self.cookie_login('log in')
# def login(self): # def login(self):
# cookies = dict_from_cookiejar(self.session.cookies) # return self.cookie_login('log in')
# if any(cookies.values()) and cookies.get('member_id'):
# return True def login(self):
# cookies = dict_from_cookiejar(self.session.cookies)
# login_params = { if any(cookies.values()) and cookies.get('member_id'):
# 'username': self.username, return True
# 'password': self.password,
# 'login': 'submit', login_params = {
# 'remember_me': 'on', 'username': self.username,
# } 'password': self.password,
# 'login': 'submit',
# try: 'remember_me': 'on',
# response = self.session.post(self.urls['login'], data=login_params, timeout=30).text }
# except Exception:
# sickrage.app.log.warning("Unable to connect to provider") try:
# return False response = self.session.post(self.urls['login'], data=login_params, timeout=30).text
# except Exception:
# if '<title>Login :: TorrentLeech.org</title>' in response: sickrage.app.log.warning("Unable to connect to provider")
# sickrage.app.log.warning("Invalid username or password. Check your settings") return False
# return False
# if '<title>Login :: TorrentLeech.org</title>' in response:
# return True sickrage.app.log.warning("Invalid username or password. Check your settings")
return False
return True
def search(self, search_strings, age=0, ep_obj=None, **kwargs): def search(self, search_strings, age=0, ep_obj=None, **kwargs):
results = [] results = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment