Skip to content

Commit 052a3f1

Browse files
authored
update inline condition for link element
Updated the condition for checking whether the link in a `link` element is inline or not, by checking whether the 'rel' attribute contains 'manifest', 'preload', or 'prefetch', to bring it more in line with the implementation in Wget2: https://gitlab.com/gnuwget/wget2/-/blob/761ae5082dae8a0b58727cd9e10dffd32cf8d03b/libwget/html_url.c#L223 Filed same change on original repo: github.com/ArchiveTeam/wpull/pull/485
1 parent f6cf1c3 commit 052a3f1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

wpull/scraper/html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ def iter_links_link_element(self, element):
375375
rel = element.attrib.get('rel', '')
376376
stylesheet = 'stylesheet' in rel
377377
icon = 'icon' in rel
378-
inline = stylesheet or icon
378+
inline = any((stylesheet, icon, 'manifest' in rel, 'preload' in rel, 'prefetch' in rel))
379379

380380
if stylesheet:
381381
link_type = LinkType.css

0 commit comments

Comments
 (0)