mirror of
https://github.com/zhigang1992/favicongrabber.com.git
synced 2026-04-30 10:31:39 +08:00
Exclude the root scope for cheerio: there are websites with problematic <head> tag or without one
This commit is contained in:
@@ -12,7 +12,7 @@ module.exports = ($) => {
|
||||
const icons = [];
|
||||
|
||||
selectors.forEach((selector) => {
|
||||
$(selector, 'head').each((i, elem) => {
|
||||
$(selector).each((i, elem) => {
|
||||
const { href, sizes, type } = elem.attribs;
|
||||
if (href !== '#') {
|
||||
const icon = {
|
||||
|
||||
Reference in New Issue
Block a user