Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save demon071/8e7791fcd5d1fff572cf5bb82fb6ebe6 to your computer and use it in GitHub Desktop.

Select an option

Save demon071/8e7791fcd5d1fff572cf5bb82fb6ebe6 to your computer and use it in GitHub Desktop.

Revisions

  1. @monokaijs monokaijs revised this gist Jul 8, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion fb-video-downloader-script.js
    Original file line number Diff line number Diff line change
    @@ -5,4 +5,4 @@
    ** Free to use, but don't abuse :>
    **/

    (()=>{let a=location.href.match(/\/(?:videos|reel|watch)(?:\/?)(?:\?v=)?(\d+)/);if(a.length<2){console.log("Please open a video before running this script.");return}let c=function(d,e){let f=[],a;for(a in d)if(d.hasOwnProperty(a)){let g=e?e+"["+a+"]":a,b=d[a];f.push(null!==b&&"object"==typeof b?c(b,g):encodeURIComponent(g)+"="+encodeURIComponent(b))}return f.join("&")},b=function(a,b){return fetch("https://www.facebook.com/api/graphql/",{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:c({doc_id:a,variables:JSON.stringify(b),fb_dtsg:require("DTSGInitialData").token,server_timestamps:!0})})};console.log("Getting info..."),b("5279476072161634",{UFI2CommentsProvider_commentsKey:"CometTahoeSidePaneQuery",caller:"CHANNEL_VIEW_FROM_PAGE_TIMELINE",displayCommentsContextEnableComment:null,displayCommentsContextIsAdPreview:null,displayCommentsContextIsAggregatedShare:null,displayCommentsContextIsStorySet:null,displayCommentsFeedbackContext:null,feedbackSource:41,feedLocation:"TAHOE",focusCommentID:null,privacySelectorRenderLocation:"COMET_STREAM",renderLocation:"video_channel",scale:1,streamChainingSection:!1,useDefaultActor:!1,videoChainingContext:null,videoID:a[1]}).then(a=>a.text()).then(b=>{try{let a=JSON.parse(b.split("\n")[0]),c=a.data.video.playable_url_quality_hd||a.data.video.playable_url;console.clear(),console.log("\u2705 Successfully retrieved download link."),console.log("======================="),console.log("%cClick this link to download: "+c,"color: green"),console.log("If your browser does not download automatically, please press Ctrl+S on your keyboard after followed the link above."),console.log("======================="),console.log("\u{1F37A} If you like me tool, gimme a follow at https://fb.me/monokaijssss !! Thank yeww <3")}catch(d){console.log("\u26A0\uFE0FFailed to extract data. Maybe this script is no longer effective.")}}).catch(a=>{console.error("\u26A0\uFE0FFailed to get data")})})()
    (()=>{let a=location.href.match(/\/(?:videos|reel|watch)(?:\/?)(?:\?v=)?(\d+)/);if(a.length<2){console.log("Please open a video before running this script.");return}let c=function(d,e){let f=[],a;for(a in d)if(d.hasOwnProperty(a)){let g=e?e+"["+a+"]":a,b=d[a];f.push(null!==b&&"object"==typeof b?c(b,g):encodeURIComponent(g)+"="+encodeURIComponent(b))}return f.join("&")},b=function(a,b){return fetch("https://www.facebook.com/api/graphql/",{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:c({doc_id:a,variables:JSON.stringify(b),fb_dtsg:require("DTSGInitialData").token,server_timestamps:!0})})};console.log("Getting info..."),b("5279476072161634",{UFI2CommentsProvider_commentsKey:"CometTahoeSidePaneQuery",caller:"CHANNEL_VIEW_FROM_PAGE_TIMELINE",displayCommentsContextEnableComment:null,displayCommentsContextIsAdPreview:null,displayCommentsContextIsAggregatedShare:null,displayCommentsContextIsStorySet:null,displayCommentsFeedbackContext:null,feedbackSource:41,feedLocation:"TAHOE",focusCommentID:null,privacySelectorRenderLocation:"COMET_STREAM",renderLocation:"video_channel",scale:1,streamChainingSection:!1,useDefaultActor:!1,videoChainingContext:null,videoID:a[1]}).then(a=>a.text()).then(b=>{try{let a=JSON.parse(b.split("\n")[0]),c=a.data.video.playable_url_quality_hd||a.data.video.playable_url;console.clear(),console.log("\u2705 Successfully retrieved download link."),console.log("======================="),console.log("%cClick this link to download: "+c,"color: green"),console.log("If your browser does not download automatically, please press Ctrl+S on your keyboard after followed the link above."),console.log("======================="),console.log("\u{1F37A} If you like my tool, gimme a follow at https://fb.me/monokaijssss !! Thank yeww <3")}catch(d){console.log("\u26A0\uFE0FFailed to extract data. Maybe this script is no longer effective.")}}).catch(a=>{console.error("\u26A0\uFE0FFailed to get data")})})()
  2. @monokaijs monokaijs revised this gist Jul 8, 2022. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions fb-video-downloader-script.js
    Original file line number Diff line number Diff line change
    @@ -1 +1,8 @@
    /**
    ** Author: @MonokaiJs
    ** Contact: monokaijs@northstudio.vn | https://fb.me/monokaijssss | monokaijs.com
    **
    ** Free to use, but don't abuse :>
    **/

    (()=>{let a=location.href.match(/\/(?:videos|reel|watch)(?:\/?)(?:\?v=)?(\d+)/);if(a.length<2){console.log("Please open a video before running this script.");return}let c=function(d,e){let f=[],a;for(a in d)if(d.hasOwnProperty(a)){let g=e?e+"["+a+"]":a,b=d[a];f.push(null!==b&&"object"==typeof b?c(b,g):encodeURIComponent(g)+"="+encodeURIComponent(b))}return f.join("&")},b=function(a,b){return fetch("https://www.facebook.com/api/graphql/",{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:c({doc_id:a,variables:JSON.stringify(b),fb_dtsg:require("DTSGInitialData").token,server_timestamps:!0})})};console.log("Getting info..."),b("5279476072161634",{UFI2CommentsProvider_commentsKey:"CometTahoeSidePaneQuery",caller:"CHANNEL_VIEW_FROM_PAGE_TIMELINE",displayCommentsContextEnableComment:null,displayCommentsContextIsAdPreview:null,displayCommentsContextIsAggregatedShare:null,displayCommentsContextIsStorySet:null,displayCommentsFeedbackContext:null,feedbackSource:41,feedLocation:"TAHOE",focusCommentID:null,privacySelectorRenderLocation:"COMET_STREAM",renderLocation:"video_channel",scale:1,streamChainingSection:!1,useDefaultActor:!1,videoChainingContext:null,videoID:a[1]}).then(a=>a.text()).then(b=>{try{let a=JSON.parse(b.split("\n")[0]),c=a.data.video.playable_url_quality_hd||a.data.video.playable_url;console.clear(),console.log("\u2705 Successfully retrieved download link."),console.log("======================="),console.log("%cClick this link to download: "+c,"color: green"),console.log("If your browser does not download automatically, please press Ctrl+S on your keyboard after followed the link above."),console.log("======================="),console.log("\u{1F37A} If you like me tool, gimme a follow at https://fb.me/monokaijssss !! Thank yeww <3")}catch(d){console.log("\u26A0\uFE0FFailed to extract data. Maybe this script is no longer effective.")}}).catch(a=>{console.error("\u26A0\uFE0FFailed to get data")})})()
  3. @monokaijs monokaijs created this gist Jul 7, 2022.
    1 change: 1 addition & 0 deletions fb-video-downloader-script.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    (()=>{let a=location.href.match(/\/(?:videos|reel|watch)(?:\/?)(?:\?v=)?(\d+)/);if(a.length<2){console.log("Please open a video before running this script.");return}let c=function(d,e){let f=[],a;for(a in d)if(d.hasOwnProperty(a)){let g=e?e+"["+a+"]":a,b=d[a];f.push(null!==b&&"object"==typeof b?c(b,g):encodeURIComponent(g)+"="+encodeURIComponent(b))}return f.join("&")},b=function(a,b){return fetch("https://www.facebook.com/api/graphql/",{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:c({doc_id:a,variables:JSON.stringify(b),fb_dtsg:require("DTSGInitialData").token,server_timestamps:!0})})};console.log("Getting info..."),b("5279476072161634",{UFI2CommentsProvider_commentsKey:"CometTahoeSidePaneQuery",caller:"CHANNEL_VIEW_FROM_PAGE_TIMELINE",displayCommentsContextEnableComment:null,displayCommentsContextIsAdPreview:null,displayCommentsContextIsAggregatedShare:null,displayCommentsContextIsStorySet:null,displayCommentsFeedbackContext:null,feedbackSource:41,feedLocation:"TAHOE",focusCommentID:null,privacySelectorRenderLocation:"COMET_STREAM",renderLocation:"video_channel",scale:1,streamChainingSection:!1,useDefaultActor:!1,videoChainingContext:null,videoID:a[1]}).then(a=>a.text()).then(b=>{try{let a=JSON.parse(b.split("\n")[0]),c=a.data.video.playable_url_quality_hd||a.data.video.playable_url;console.clear(),console.log("\u2705 Successfully retrieved download link."),console.log("======================="),console.log("%cClick this link to download: "+c,"color: green"),console.log("If your browser does not download automatically, please press Ctrl+S on your keyboard after followed the link above."),console.log("======================="),console.log("\u{1F37A} If you like me tool, gimme a follow at https://fb.me/monokaijssss !! Thank yeww <3")}catch(d){console.log("\u26A0\uFE0FFailed to extract data. Maybe this script is no longer effective.")}}).catch(a=>{console.error("\u26A0\uFE0FFailed to get data")})})()