Skip to content

Getting iframe tag and src to play video #572

@jorgelucasea

Description

@jorgelucasea

Configuration

  • version - website-scraper@5.3.1
    const options = {
    urls: [url],
    directory: targetDir,
    prettifyUrls: true,
    requestConcurrency: 5,
    sources: [
    { selector: 'style' },
    { selector: '[style]', attr: 'style' },
    { selector: 'link[rel="stylesheet"]', attr: 'href' },
    { selector: 'link[rel="icon"]', attr: 'href' },
    { selector: 'link[rel="preload"]', attr: 'href' },
    { selector: 'link[rel="shortcut icon"]', attr: 'href' },
    { selector: 'link[rel="apple-touch-icon"]', attr: 'href' },
    { selector: 'img', attr: 'srcset' },
    { selector: 'img', attr: 'src' },
    { selector: 'img', attr: 'data-lazy-src'},
    { selector: 'script', attr: 'src' },
    { selector: 'iframe', attr: 'src' }
    ],
    plugins: [saveResourcePlugin(quality, targetDir)],
    request: {
    encoding: 'utf-8',
    headers: {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36',
    'Content-Type': 'text/html; charset=utf-8'
    }
    }
    };

Describe the bug
I'm cloning a website (https://receitasparabebes.online/ta-na-hora-do-papa-1-r-2990/), everything is coming according to what is expected, except, the iframe tag is not being cloned and I can`t play the video anyway.

Expected behavior
I want to be able to clone every iframe tag and its source, so I can play the video locally.

Actual behavior
It shows an empty box where the iframe tag is.

Additional context
I tried it with different websites and none its cloning the iframe tag.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions