Pep8 cleaning
This commit is contained in:
parent
b671819d91
commit
4a327e153e
2 changed files with 9 additions and 6 deletions
|
|
@ -40,11 +40,14 @@ class NewspaperPresseuropBackend(GenericNewspaperBackend, ICapMessages):
|
||||||
URL2ID = staticmethod(url2id)
|
URL2ID = staticmethod(url2id)
|
||||||
RSSSIZE = 180
|
RSSSIZE = 180
|
||||||
CONFIG = BackendConfig(Value('lang', label='Lang of articles',
|
CONFIG = BackendConfig(Value('lang', label='Lang of articles',
|
||||||
choices={'fr': 'fr', 'de': 'de', 'en': 'en', 'cs': 'cs', 'es': 'es', 'it': 'it', 'nl': 'nl', 'pl': 'pl', 'pt': 'pt', 'ro': 'ro'}, default='fr'))
|
choices={'fr': 'fr', 'de': 'de', 'en': 'en',
|
||||||
|
'cs': 'cs', 'es': 'es', 'it': 'it', 'nl': 'nl',
|
||||||
|
'pl': 'pl', 'pt': 'pt', 'ro': 'ro'},
|
||||||
|
default='fr'))
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
GenericNewspaperBackend.__init__(self, *args, **kwargs)
|
GenericNewspaperBackend.__init__(self, *args, **kwargs)
|
||||||
self.RSS_FEED = 'http://www.presseurop.eu/%s/rss.xml' % (self.config['lang'].get())
|
self.RSS_FEED = 'http://www.presseurop.eu/%s/rss.xml' % self.config['lang'].get()
|
||||||
|
|
||||||
def iter_threads(self):
|
def iter_threads(self):
|
||||||
daily = []
|
daily = []
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from weboob.tools.capabilities.messages.genericArticle import GenericNewsPage, try_drop_tree, \
|
from weboob.tools.capabilities.messages.genericArticle import GenericNewsPage,\
|
||||||
clean_relativ_urls
|
try_drop_tree, clean_relativ_urls
|
||||||
|
|
||||||
|
|
||||||
class PresseuropPage(GenericNewsPage):
|
class PresseuropPage(GenericNewsPage):
|
||||||
|
|
@ -61,10 +61,10 @@ class DailyTitlesPage(PresseuropPage):
|
||||||
return self.parser.tostring(element_body)
|
return self.parser.tostring(element_body)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class DailySinglePage(PresseuropPage):
|
class DailySinglePage(PresseuropPage):
|
||||||
def get_daily_date(self):
|
def get_daily_date(self):
|
||||||
ul = self.document.getroot().xpath("//ul[@class='carousel-skin carousel-today']")
|
ul = self.document.getroot().xpath(
|
||||||
|
"//ul[@class='carousel-skin carousel-today']")
|
||||||
if len(ul) > 0:
|
if len(ul) > 0:
|
||||||
link = ul[0].xpath('li/a')[0]
|
link = ul[0].xpath('li/a')[0]
|
||||||
date = link.attrib['href'].split('/')[3]
|
date = link.attrib['href'].split('/')[3]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue