Change headers

This commit is contained in:
Florent 2012-02-18 17:00:29 +01:00 committed by Romain Bignon
commit 776cf8b74a
6 changed files with 10 additions and 22 deletions

View file

@ -1,8 +1,7 @@
"tools for lefigaro backend"
"tools for presseurop backend"
# -*- coding: utf-8 -*-
# Copyright(C) 2011 Julien Hebert
#
# Copyright(C) 2012 Florent Fourcot
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
@ -20,17 +19,6 @@
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):
"return an id from an url"
regexp = re.compile(".*/([0-9]+)-.*")