On nettoie l'url facebook si elle contient le nom de l'événement
This commit is contained in:
parent
499f90e88c
commit
e1721db311
@ -237,6 +237,12 @@ class FacebookEventExtractor(Extractor):
|
|||||||
if FacebookEventExtractor.is_known_url(url):
|
if FacebookEventExtractor.is_known_url(url):
|
||||||
u = urlparse(url)
|
u = urlparse(url)
|
||||||
result = "https://www.facebook.com" + u.path
|
result = "https://www.facebook.com" + u.path
|
||||||
|
|
||||||
|
# remove name in the url
|
||||||
|
match = re.match(r"(.*/events)/s/([a-zA-Z-][a-zA-Z-0-9]+)/([0-9/]*)", result)
|
||||||
|
if match:
|
||||||
|
result = match[1] + "/" + match[3]
|
||||||
|
|
||||||
if result[-1] == "/":
|
if result[-1] == "/":
|
||||||
return result[:-1]
|
return result[:-1]
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user