Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions plugins/domains/dailymail.co.uk/mol.im.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default {

// direct "share" links to players from DailyMail articles. They end with #v-1467332342001
re: [
/^https?:\/\/www\.dailymail\.co\.uk\/[^#]+#(v\-\d+)$/i
/^https?:\/\/www\.dailymail\.com\/[^#]+#(v\-\d+)$/i
],

provides: 'dailymailVideoID',
Expand All @@ -19,7 +19,10 @@ export default {
tests: [{
noFeeds: true
},
"https://www.dailymail.com/lifestyle/article-11847441/Watch-new-Duke-Edinburgh-introduces-Sophie-duchess-time.html#v-6755232965847660921",
"https://www.dailymail.com/news/article-3556177/Was-MH17-shot-Ukrainian-fighter-jet-BBC-documentary-claims-Boeing-777-targeted-plane.html#v-8296301435444282732",

"https://www.dailymail.co.uk/lifestyle/article-11847441/Watch-new-Duke-Edinburgh-introduces-Sophie-duchess-time.html#v-6755232965847660921",
"https://www.dailymail.co.uk/news/article-3556177/Was-MH17-shot-Ukrainian-fighter-jet-BBC-documentary-claims-Boeing-777-targeted-plane.html#v-8296301435444282732"
// co.uk redirects to com via dailymail.co.uk-hash-redirect plugin
]
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default {

re: [
/^https?:\/\/www\.dailymail\.co\.uk\/video\/\w+\/video\-(\d+)\//i
/^https?:\/\/www\.dailymail\.com\/video\/\w+\/video\-(\d+)\//i
],

provides: 'dailymailVideoID',
Expand All @@ -20,6 +20,7 @@ export default {
tests: [{
noFeeds: true
},
"https://www.dailymail.co.uk/video/news/video-1284607/Heart-rending-scenes-child-marriage-ceremonies-India.html"
"https://www.dailymail.co.uk/video/news/video-1284607/Heart-rending-scenes-child-marriage-ceremonies-India.html",
"https://www.dailymail.com/video/royals/video-3639009/Video-Celebrations-late-Queens-100th-birthday.html"
]
};
34 changes: 34 additions & 0 deletions plugins/domains/dailymail.com/dailymail.hash-redirects.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
export default {

// #v-1467332342001 isn't passed by Dailymail URL shortener
// dailymail.co.uk 301 redirects to dailymail.com, stripping the hash fragment
re: [
/^https:\/\/mol\.im\/a\/\d+(#v\-\d+)/i,
/^https?:\/\/www\.dailymail\.co\.uk\/[^#]+(#v\-\d+)/i
],

getLink: function(urlMatch, headers, cb) {
if (headers.location) {
return cb(headers.location
&& !/#/.test(headers.location)
? {
redirect: headers.location + urlMatch[1]
} : null
);
} else {
return cb();
}
},

getData: function(options) {
options.exposeStatusCode = true;
},

tests: [{skipMethods: ['getData', 'getLink']},
"https://mol.im/a/9343193#v-4206468436429980814",
"https://www.dailymail.co.uk/lifestyle/article-11847441/Watch-new-Duke-Edinburgh-introduces-Sophie-duchess-time.html#v-6755232965847660921",

"https://mol.im/a/15740741#v-6420720503543215467", // getLinks error is expected - no social-share embedUrl, falls back to generic parsers
"https://www.dailymail.co.uk/news/article-3556177/Was-MH17-shot-Ukrainian-fighter-jet-BBC-documentary-claims-Boeing-777-targeted-plane.html#v-8296301435444282732" // getLinks error is expected - no social-share embedUrl, falls back to generic parsers
]
};
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default {
tests: [{
noFeeds: true
},
"https://www.dailymail.co.uk/video/news/video-2895505/SVB-members-sets-bank-culture-apart-others.html"
"https://www.dailymail.co.uk/video/news/video-2895505/SVB-members-sets-bank-culture-apart-others.html",
"https://www.dailymail.com/video/news/video-3639123/Trump-says-expects-bomb-Iran-ceasefire-deal-ends.html"
]
};
3 changes: 2 additions & 1 deletion plugins/links/hosted/23video-hosted.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default {
"https://video.itu.dk/live/13796543",
"https://video.ku.dk/video/11827941/visual-social-media-lab-farida-vis-anne",
"https://video.nextconf.eu/video/1880845/data-without-limits",
"https://www.fftv.no/skipatruljen-s3e3-voss-resort",
"https://video.itu.dk/video/91172759/kandidat-i-softwaredesign-los",
// "https://www.fftv.no/skipatruljen-s3e3-voss-resort", No oEmbed discovery tags
]
};
Loading