URL facebook simplifiée des éléments de navigation

This commit is contained in:
Jean-Marie Favreau 2023-11-18 19:31:49 +01:00
parent cb134d04c1
commit 1c514631a4

View File

@ -194,6 +194,8 @@ class ExtractorFacebook(Extractor):
image = self.get_element("image")
local_image = None if image is None else Extractor.download_media(image)
u = urlparse(url)
unique_url = u.scheme + "://" + u.netloc + u.path
return Event(title=self.get_element("name"),
status=Event.STATUS.DRAFT,
@ -206,7 +208,7 @@ class ExtractorFacebook(Extractor):
local_image=local_image,
image=self.get_element("image"),
image_alt=self.get_element("image_alt"),
reference_urls=[url])
reference_urls=[unique_url])
def process_page(txt, url):