Skip to content

Commit

Permalink
1.3: Fix the selector which has changed on the ARTE website.
Browse files Browse the repository at this point in the history
  • Loading branch information
GuGuss committed Sep 8, 2014
1 parent 835ca46 commit 3d1eb26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arte-downloader.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// @namespace GuGuss
// @description Display direct links to MP4 videos of Arte+7 programs
// @include http://www.arte.tv/guide/*
// @version 1.2
// @version 1.3
// ==/UserScript==

// Set this to 1 to enable console logs.
Expand Down Expand Up @@ -48,7 +48,7 @@ downloadSQ.innerHTML= "Download <strong>Low</strong> Quality <span class='icomoo
downloadSQ.onclick = function() { triggerOnClick('HQ') }; // For Chrome

// Display the buttons next to the video using XPath query.
var details_focus = document.evaluate("//*[@id='details-focus']", document.documentElement, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
var details_focus = document.evaluate("/html/body/div[4]/section[2]", document.documentElement, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
details_focus.snapshotItem(0).appendChild(downloadHQ);
details_focus.snapshotItem(0).appendChild(downloadEQ);
details_focus.snapshotItem(0).appendChild(downloadSQ);
Expand Down Expand Up @@ -80,7 +80,7 @@ function triggerOnClick(quality){
function getJsonUrl() {

// Run the XPath query using the XPath identifier of the player.
result = document.evaluate("//*[@id='details-focus']/div/div/div/div/div[2]", document.documentElement, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
result = document.evaluate("//*[@arte_vp_autostart=1]", document.documentElement, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);

// Get the value of the "arte_vp_url" attribute which contains the player URL.
playerUrl = result.snapshotItem(0).getAttribute("arte_vp_url");
Expand Down

0 comments on commit 3d1eb26

Please sign in to comment.