simplify and factorize code, remove dead code, follow conventions, use new-style classes

This commit is contained in:
Christophe Benz 2010-12-09 15:27:06 +01:00 committed by Romain Bignon
commit f1b3264a67
28 changed files with 202 additions and 251 deletions

View file

@ -15,12 +15,17 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from datetime import datetime
import re
from datetime import datetime
from weboob.tools.browser import BasePage
__all__ = ['BoardPage']
class Message(object):
def __init__(self, browser, board, id, filename=u'', url=u''):
self.id = id
@ -42,6 +47,7 @@ class Message(object):
def __repr__(self):
return '<Message id=%s filename=%s url=%s comments=%d>' % (self.id, self.filename, self.url, len(self.comments))
class BoardPage(BasePage):
URL_REGEXP = re.compile('http://boards.4chan.org/(\w+)/')