Change headers
This commit is contained in:
parent
e502bb2f69
commit
776cf8b74a
6 changed files with 10 additions and 22 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
"NewspaperEcransBackend init"
|
"NewspaperPresseuropBackend init"
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright(C) 2011 Julien Hebert
|
# Copyright(C) 2012 Florent Fourcot
|
||||||
#
|
#
|
||||||
# This file is part of weboob.
|
# This file is part of weboob.
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright(C) 2011 Julien Hebert
|
# Copyright(C) 2012 Florent Fourcot
|
||||||
#
|
#
|
||||||
# This file is part of weboob.
|
# This file is part of weboob.
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
"browser for ecrans website"
|
"browser for presseurop website"
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright(C) 2011 Julien Hebert
|
# Copyright(C) 2012 Florent Fourcot
|
||||||
#
|
#
|
||||||
# This file is part of weboob.
|
# This file is part of weboob.
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
"ArticlePage object for inrocks"
|
"ArticlePage object for presseurope"
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright(C) 2011 Julien Hebert
|
# Copyright(C) 2012 Florent Fourcot
|
||||||
#
|
#
|
||||||
# This file is part of weboob.
|
# This file is part of weboob.
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright(C) 2010-2011 Romain Bignon
|
# Copyright(C) 2012 Florent Fourcot
|
||||||
#
|
#
|
||||||
# This file is part of weboob.
|
# This file is part of weboob.
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
"tools for lefigaro backend"
|
"tools for presseurop backend"
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright(C) 2011 Julien Hebert
|
# Copyright(C) 2012 Florent Fourcot
|
||||||
#
|
|
||||||
# This file is part of weboob.
|
# This file is part of weboob.
|
||||||
#
|
#
|
||||||
# weboob is free software: you can redistribute it and/or modify
|
# weboob is free software: you can redistribute it and/or modify
|
||||||
|
|
@ -20,17 +19,6 @@
|
||||||
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
def id2url(_id):
|
|
||||||
"return an url from an id"
|
|
||||||
regexp2 = re.compile("(\w+).([0-9]+).(.*$)")
|
|
||||||
match = regexp2.match(_id)
|
|
||||||
if match:
|
|
||||||
return 'http://www.20minutes.fr/%s/%s/%s' % ( match.group(1),
|
|
||||||
match.group(2),
|
|
||||||
match.group(3))
|
|
||||||
else:
|
|
||||||
raise ValueError("id doesn't match")
|
|
||||||
|
|
||||||
def url2id(url):
|
def url2id(url):
|
||||||
"return an id from an url"
|
"return an id from an url"
|
||||||
regexp = re.compile(".*/([0-9]+)-.*")
|
regexp = re.compile(".*/([0-9]+)-.*")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue