luin / readability

📚 Turn any web page into a clean view
2.49k stars 312 forks source link

Keeps skipping iframe #98

Closed patrickmuhi closed 7 years ago

patrickmuhi commented 7 years ago

Is there a way to pull iframes aswell? for example an iframe from youtube

patrickmuhi commented 7 years ago

Looking through your sources, you imagine that a video from youtube will have an 'embed' element which is wrong, these days all youtube videos are enclosed in an iframe,

i found a way to solve this, maybe i might do a PR,

It's just a single line i edited anyway

patrickmuhi commented 7 years ago

99

haroldtreen commented 7 years ago

Where are you expecting to see the iframe? I don't have context on why the iframes are removed, but I don't believe that the extension searches within iframes for potential content.

Is this just so that they are within jsdom when the extraction completes? I'm not following the use case for this.

patrickmuhi commented 7 years ago

@haroldtreen i wanted to extract youtube videos, but most are iframes. You remove iframes, some have youtube videos. in #99 i removed the line that cleans out iframes, will play with it later and valid if an iframe has a video. closing this now.