mirror of
https://github.com/wukko/cobalt.git
synced 2025-06-12 13:17:45 +02:00
small fix for instagram reels
- now all reels should be possible to download - also added support for youtube embed links
This commit is contained in:
@ -17,6 +17,7 @@ export default async function(obj) {
|
||||
if (!html.includes('application/ld+json')) return { error: 'ErrorEmptyDownload' };
|
||||
|
||||
let single, multiple = [], postInfo = JSON.parse(html.split('script type="application/ld+json"')[1].split('">')[1].split('</script>')[0]);
|
||||
if (Array.isArray(postInfo)) postInfo = postInfo[0];
|
||||
|
||||
if (postInfo.video.length > 1) {
|
||||
for (let i in postInfo.video) { multiple.push({type: "video", thumb: postInfo.video[i]["thumbnailUrl"], url: postInfo.video[i]["contentUrl"]}) }
|
||||
|
@ -23,7 +23,7 @@
|
||||
},
|
||||
"youtube": {
|
||||
"alias": "youtube videos & shorts & music",
|
||||
"patterns": ["watch?v=:id"],
|
||||
"patterns": ["watch?v=:id", "embed/:id"],
|
||||
"bestAudio": "opus",
|
||||
"enabled": true
|
||||
},
|
||||
|
Reference in New Issue
Block a user