mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-24 08:52:31 +02:00
update regex to match version
This commit is contained in:
parent
8443ef57f3
commit
06d53a4bcc
@ -28,7 +28,7 @@ def filter(url, data):
|
||||
try:
|
||||
dom = lxml.html.fromstring(data.encode('utf-8'))
|
||||
txt = dom.xpath(exp)[0]
|
||||
ver = re.search(r'([0-9]+\.)*[0-9]+', txt).group(0)
|
||||
ver = re.search(r'(?i)([0-9]+\.)*[0-9]+(-?(alpha|beta|rc)[0-9]+)?', txt).group(0).lower()
|
||||
return '{}: {}\n'.format(key, ver)
|
||||
except:
|
||||
return '{}: {}\n'.format(key, 'unknown')
|
||||
|
Loading…
Reference in New Issue
Block a user