# coding=utf-8
#
# This file is part of SickGear.
#
# SickGear is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SickGear is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SickGear. If not, see .
import re
import traceback
from . import generic
from sickbeard import logger
from sickbeard.bs4_parser import BS4Parser
from sickbeard.helpers import tryInt
from lib.unidecode import unidecode
class PotUKProvider(generic.TorrentProvider):
def __init__(self):
generic.TorrentProvider.__init__(self, 'PotUK')
self.url_base = 'http://www.potuk.com/newforum/'
self.urls = {'config_provider_home_uri': self.url_base,
'login': self.url_base + 'search.php',
'browse': self.url_base + 'search.php?do=getdaily&exclude=%s',
'get_data': self.url_base + 'misc.php?do=showattachments&t=%s'}
self.url = self.urls['config_provider_home_uri']
self.digest, self.resp = 2 * [None]
def logged_in(self, resp):
try:
self.resp = re.findall('(?sim)