usernames can have a '-' in them

This commit is contained in:
Romain Bignon 2011-03-13 15:01:04 +01:00
commit 73c4a43c07
2 changed files with 3 additions and 3 deletions

View file

@ -33,7 +33,7 @@ class DLFP(BaseBrowser):
PAGES = {'https://linuxfr.org/?': IndexPage,
'https://linuxfr.org/login.html': LoginPage,
'https://linuxfr.org/news/[^\.]+': ContentPage,
'https://linuxfr.org/users/[\w_]+/journaux/[^\.]+': ContentPage,
'https://linuxfr.org/users/[\w\-_]+/journaux/[^\.]+': ContentPage,
'https://linuxfr.org/nodes/(\d+)/comments/(\d+)$': CommentPage,
'https://linuxfr.org/nodes/(\d+)/comments/nouveau': NewCommentPage,
'https://linuxfr.org/nodes/(\d+)/comments$': NodePage,

View file

@ -19,8 +19,8 @@
import re
RSSID_RE = re.compile('tag:.*:(\w)\w+/(\d+)')
ID2URL_RE = re.compile('^(\w)([\w_]*)\.([^\.]+)$')
URL2ID_DIARY_RE = re.compile('.*/users/([\w_]+)/journaux/([^\.]+)')
ID2URL_RE = re.compile('^(\w)([\w\-_]*)\.([^\.]+)$')
URL2ID_DIARY_RE = re.compile('.*/users/([\w\-_]+)/journaux/([^\.]+)')
URL2ID_NEWSPAPER_RE = re.compile('.*/news/(.+)')
def rssid(entry):