trafilatura
trafilatura copied to clipboard
Add include_video parameter (iframe elements are missing)
I've noticed Iframe elements are missing, such as those containing youtube videos. I don't see any arguments to control iframes. Is this by design?
Hi @fraseInc, I tend indeed to discard iframes by design as embedded content is usually not as relevant text-wise. Do you have examples of elements which should be included?
I think things like Youtube, and videos in general are important. At least as an optional argument, similar to how you handle tables or images. we could add an include_videos filter?
The typical Youtube embed looks something like this:
<iframe src="//www.youtube.com/embed/IkgLUo82eWg?rel=0" allowfullscreen="" loading="lazy" decoding="async"></iframe>
An additional argument is tricky for maintenance reasons but thanks, I'll think about it.