youtube-dl icon indicating copy to clipboard operation
youtube-dl copied to clipboard

[Generic] Check iframes for known file extensions

Open johnhawkinson opened this issue 7 years ago • 1 comments

As discussed in #12692, this is the easy option, 1.:

  1. Check file extension of iframes for ../utils/KNOWN_EXTENSIONS. (This could happen fairly early in GenericIE)

Since Sergey said

By default only 1 can be applied.

Unfortunately, between then and now(*), the test case I had updated to point to a Youtube video, and I don't have a test case for the direct iframe link. I searched https://publicwww.com/ and didn't come up with anything. I guess they're not common.

So I don't know if this is worth committing without a test. It works against my local webserver with the iframe from yesterday inserted:

<iframe height="360" width="640"
      src="https://cdn-e2.streamable.com/video/mp4/wfatk.mp4?token=1492919903_c3707bc86745b37c149c2be0da56b98a275b2b74"
    >
    </iframe>

Or I could add a test to test_InfoExtractor.py?


(*) I suppose maybe it's fortunate that it happened so quickly, rather than happening next week after this was committed and breaking the test case while no one was watching.

johnhawkinson avatar Apr 10 '17 00:04 johnhawkinson

fyi, VF has another of these tonight

http://www.vanityfair.com/hollywood/2017/04/snl-melissa-mccarthy-sean-spicer-easter-bunny-hitler

which has

<div
  class="embed iframe-embed-component "
  data-type="iframe"
  data-url="https://cdn-e2.streamable.com/video/mp4/wb4dr.mp4?token=1493525991_6e4d1806902118fba090b4e528109b806e5d8c4d"
>
  <iframe
    height="360" width="640"
    src="https://cdn-e2.streamable.com/video/mp4/wb4dr.mp4?token=1493525991_6e4d1806902118fba090b4e528109b806e5d8c4d"
  >
  </iframe>
</div>

And this code properly works against it.

I imagine they'll replace it with a Youtube link when SNL posts their youtube stuff, though, like last week…

johnhawkinson avatar Apr 16 '17 05:04 johnhawkinson