ohoachuck / wwdc-downloader

WWDC 2019 video downloader script written in Swift - no external dependency.
http://blog.hoachuck.biz
1.49k stars 142 forks source link

Avoid matching "http_" in session names #55

Closed gui-dos closed 8 years ago

gui-dos commented 8 years ago

If you try to download all the PDFs, the process stops at the session 504 with the following error:

[Session 504] Getting http_live_streaming.pdf (http_live_streaming.pdf):

Ooops! Something went wrong: unsupported URL
retrying file download...

That's because the pattern http.*\\.pdf used in getPDFResourceURLFromString() matches the partial "http_" string in the middle of the session names.

ohoachuck commented 8 years ago

Hello gui-dos, thank you very much for pointing the issue. And for contributing. I did not have time to test and check Tuni Pull Request made few hours before you, but he also had fixed the same bug you have fixed here. If you don't mind, I prefer to keep his approach as "http://" (rather than http[^_]) might be more secure in stead of other fancy names comes like "http2", "httpls", "http-", etc.

Thank you again for pointing this ! And for having look closely in order to fix. O.