Closed hendrikschneider closed 2 years ago
Hello,
in the following url is a relative path used for the image: https://www.wirtschaftsfoerderung-hannover.de/de/Veranstaltungen/hannoverimpuls/Dos_and_Donts_des_E-Commerce.php/medien/bilder/hannoverimpuls/Logos/Screenshot_2022-10-18_121717_0.png
from linkpreview import link_preview preview = link_preview("https://www.wirtschaftsfoerderung-hannover.de/de/Veranstaltungen/hannoverimpuls/Dos_and_Donts_des_E-Commerce.php/medien/bilder/hannoverimpuls/Logos/Screenshot_2022-10-18_121717_0.png") preview.image # /medien/bilder/hannoverimpuls/Logos/Screenshot_2022-10-18_121717_0.png?m=1666088811& preview.absolute_image # https://www.wirtschaftsfoerderung-hannover.de/de/Veranstaltungen/hannoverimpuls/Dos_and_Donts_des_E-Commerce.php/medien/bilder/hannoverimpuls/Logos/Screenshot_2022-10-18_121717_0.png/medien/bilder/hannoverimpuls/Logos/Screenshot_2022-10-18_121717_0.png?m=1666088811&
Expected result:
preview.absolute_image # https://www.wirtschaftsfoerderung-hannover.de/medien/bilder/hannoverimpuls/Logos/Screenshot_2022-10-18_121717_0.png?m=1666088811&
A library such as tld extract could be helpful to retrieve the domain of a path but it also introduces a new depency.
Thanks for the fast support!
Hello,
in the following url is a relative path used for the image: https://www.wirtschaftsfoerderung-hannover.de/de/Veranstaltungen/hannoverimpuls/Dos_and_Donts_des_E-Commerce.php/medien/bilder/hannoverimpuls/Logos/Screenshot_2022-10-18_121717_0.png
Expected result:
A library such as tld extract could be helpful to retrieve the domain of a path but it also introduces a new depency.