Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Prevent errors when other extensions removes <embed> element #4

Merged
merged 2 commits into from

5 participants

@zhusee2

YouTube5 extension introduces a new script which removes the element on YouTube video pages, making YouTube video downloader unable to parse for format URLs from the element. So I've changed the parse rule and now it should get the same information directly from the PLAYER_CONFIG settings in

zhusee2 added some commits
@zhusee2 zhusee2 avoid script to be injected into wrong pages 6814ecd
@zhusee2 zhusee2 Parse format URLs by inspecting the PLAYER_CONFIG in script instead.
This commit is aim to resolve the conflict this extension and YouTube5 extension v2.2.4. The later introduce new script which removes the <embed> element from YouTube video pages, making YouTube Video Downloader unable to get possible format URLs by getting that element.
24de51f
@gingerbeardman

Thanks zhusee2!

@david-San

Hi! I can see the fix has been submitted and apparently works. When is it going to be deployed?

@aonez

HTML5 not working for me. Sorry for comment on here but I can't see how to pull a request. If you tell me how (please...) I will tell you what I found about this. Thanks!

@jonathanboom jonathanboom merged commit f1bfa5d into jonathanboom:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 6, 2011
  1. @zhusee2
  2. @zhusee2

    Parse format URLs by inspecting the PLAYER_CONFIG in script instead.

    zhusee2 authored
    This commit is aim to resolve the conflict this extension and YouTube5 extension v2.2.4. The later introduce new script which removes the <embed> element from YouTube video pages, making YouTube Video Downloader unable to get possible format URLs by getting that element.
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 1 deletion.
  1. +1 −1  Add download button.js
  2. +4 −0 Info.plist
View
2  Add download button.js
@@ -38,7 +38,7 @@ formatDescriptions['37'] = [1, "Full HD MP4 (1080p)"];
var encodedTitle = escape(document.getElementById("eow-title").title);
if (!htmlFive) {
// get the URL map for the formats
- formatURLMap = htmlSource.split("fmt_url_map=")[1].split("&")[0];
+ formatURLMap = htmlSource.split('PLAYER_CONFIG')[1].split("fmt_url_map\": \"")[1].split("\",")[0]
// fix bug with last format by adding a comma to the end
formatURLMap += ",";
// replace HTML encodings
View
4 Info.plist
@@ -25,6 +25,10 @@
<string>Add download button.js</string>
</array>
</dict>
+ <key>Whitelist</key>
+ <array>
+ <string>http://*.youtube.com/watch</string>
+ </array>
</dict>
<key>Description</key>
<string>Adds download links to YouTube video pages.</string>
Something went wrong with that request. Please try again.