more flexible code

This commit is contained in:
Romain Bignon 2011-08-24 17:19:37 +02:00
commit c0773c1f92
4 changed files with 69 additions and 22 deletions

View file

@ -31,8 +31,10 @@ from .tools import id2url, url2id
# Browser
class PhpBB(BaseBrowser):
PAGES = {'https?://.*/index.php': ForumPage,
'https?://.*/': ForumPage,
'https?://.*/viewforum.php\?f=(\d+)': ForumPage,
'https?://.*/viewtopic.php\?.*': TopicPage,
'https?://.*/search.php\?.*': ForumPage,
'https?://.*/viewtopic.php\?.*': TopicPage,
'https?://.*/ucp.php\?mode=login.*': LoginPage,
}