[batoto] fix cache time for login sessions

from 1 year to 1 week ...
This commit is contained in:
Mike Fährmann
2017-03-26 20:53:56 +02:00
parent e2b5cd9918
commit 6cbb078392

View File

@@ -23,13 +23,13 @@ class BatotoExtractor(Extractor):
"""Login and set necessary cookies"""
username = config.interpolate(("extractor", "batoto", "username"))
password = config.interpolate(("extractor", "batoto", "password"))
if username and password:
if username:
cookies = self._login_impl(username, password)
for key, value in cookies.items():
self.session.cookies.set(
key, value, domain=".bato.to", path="/")
@cache(maxage=360*24*60*60, keyarg=1)
@cache(maxage=7*24*60*60, keyarg=1)
def _login_impl(self, username, password):
"""Actual login implementation"""
self.log.info("Logging in as %s", username)