async fetchBookmarkData(url, html, type) {
        const gotOpts = {
            headers: {
                'User-Agent': USER_AGENT
            }
        };

        if (process.env.NODE_ENV?.startsWith('test')) {
            gotOpts.retry = 0;
        }

        const pickFn = (sizes, pickDefault) => {
            // Prioritize apple touch icon with sizes > 180
            const appleTouchIcon = sizes.find(item => item.rel?.includes('apple') && item.sizes && item.size.width >= 180);
            const svgIcon = sizes.find(item => item.href?.endsWith('svg'));
            return appleTouchIcon || svgIcon || pickDefault(sizes);
        };

        const metascraper = require('metascraper')([
            require('metascraper-url')(),
            require('metascraper-title')(),
            require('metascraper-description')(),
            require('metascraper-author')(),
            require('metascraper-publisher')(),
            require('metascraper-image')(),
            require('metascraper-logo-favicon')({
                gotOpts,
                pickFn
            }),
            require('metascraper-logo')()
        ]);

        let scraperResponse;

        try {
            scraperResponse = await metascraper({
                html,
                url,
                // In development, allow non-standard TLDs
                validateUrl: this.config.get('env') !== 'development'
            });
        } catch (err) {
            // Log to avoid being blind to errors happening in metascraper
            logging.error(err);
            return this.unknownProvider(url);
        }

        const metadata = Object.assign({}, scraperResponse, {
            thumbnail: scraperResponse.image,
            icon: scraperResponse.logo
        });
        // We want to use standard naming for image and logo
        delete metadata.image;
        delete metadata.logo;

        if (!metadata.title) {
            throw new errors.ValidationError({
                message: tpl(messages.insufficientMetadata),
                context: url
            });
        }

        if (type === 'mention') {
            if (metadata.icon) {
                try {
                    await this.externalRequest.head(metadata.icon);
                } catch (err) {
                    metadata.icon = 'https://static.ghost.org/v5.0.0/images/link-icon.svg';
                    logging.error(err);
                }
            }
        } else {
            await this.processImageFromUrl(metadata.icon, 'icon')
                .then((processedImageUrl) => {
                    metadata.icon = processedImageUrl;
                }).catch((err) => {
                    metadata.icon = 'https://static.ghost.org/v5.0.0/images/link-icon.svg';
                    logging.error(err);
                });
            await this.processImageFromUrl(metadata.thumbnail, 'thumbnail')
                .then((processedImageUrl) => {
                    metadata.thumbnail = processedImageUrl;
                }).catch((err) => {
                    logging.error(err);
                });
        }

        return {
            version: '1.0',
            type: 'bookmark',
            url,
            metadata
        };
    }
@param {string} url
@param {string} html

@returns {Promise<Object>}