Skip to content

Instantly share code, notes, and snippets.

@akshatmittal
Last active July 7, 2016 03:40
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save akshatmittal/8802537 to your computer and use it in GitHub Desktop.
Save akshatmittal/8802537 to your computer and use it in GitHub Desktop.
Facebook Look Back video extractor.
Hey there,
Use the main.js to download your video, instructions included in that file.
(File is here on this page itself, either above or below this)
If in case, Facebook didn't made a video for you, read this:
http://on.fb.me/LookBackNoVideo
If you got your video once, and you deleted a timeline post (or anything else)
which made the video disappear from the page, you can still retrieve the
file from your browser cache.
**Google Chrome**
1. Open a new tab and type in "chrome://cache"
2. Press Ctrl + F to search on page, type "https://lookbackvideo"
3. The URL which gets highlighted are the Lookback videos.
Right click the link and choose "Open link in new tab"
4. There's your video! Watch it! Save it! Do whatever.
5*. To save it, just hit Ctrl + S on your keyboard.
**Mozilla Firefox**
1. Open a new tab and type in "about:cache"
2. On this screen, click "List Cache Entries
3. Press Ctrl + F to search on page, type "https://lookbackvideo"
4. The URL which gets highlighted are the Lookback videos.
Click it. It will open Cache Entry.
5. Now, click the URL which you see labled as "key", almost at the top.
6. There's your video! Watch it! Save it! Do whatever.
7*. To save it, just hit Ctrl + S on your keyboard.
That's how to save the video!
~Akshat Mittal
/*
Simple JS Script to get Video URL from Facebook's Look Back
Version: 1.1.0
Author: https://www.facebook.com/itsreallyakshat
Copy paste this whole code into Chrome Console and press enter.
You can execure this script on any page on Facebook.
It will give you the video URL, open it, view it, download it, do whatever you want to. :P
The video URL will popup in front of you, press Ctrl + C to copy it.
To do so, open Chrome Console, Ctrl + Shift + J, "Console" tab.
Copy paste the whole thing there.
To share it, just open the link and download it by pressing Ctrl + S.
Upload it to YouTube or wherever you want to. Share, enjoy! :)
Keep Sharing this with everyone! :)
EDIT: No Longer works, Facebook modified!
*/
var xmlhttp;
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
} else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
ss = xmlhttp.responseText.split('[["params","')[1].split('"],["width","960"]')[0];
var x = ss;
var r = /\\u([\d\w]{4})/gi;
x = x.replace(r, function (match, grp) {return String.fromCharCode(parseInt(grp, 16)); });
x = unescape(x);
console.log(JSON.parse(x).video_data[0].hd_src);
prompt("Here's your video URL (HD)! Press Ctrl + C to copy it!", JSON.parse(x).video_data[0].hd_src)
}
}
xmlhttp.open("GET", "/lookback", true);
xmlhttp.send();
@ponoforever
Copy link

-0-

@flaviatlemes
Copy link

its not working

@ferylukacs
Copy link

It's great!

@mbilobrk
Copy link

mbilobrk commented Feb 4, 2014

..nice!

@cdiaz85
Copy link

cdiaz85 commented Feb 4, 2014

I keep getting this error: Uncaught TypeError: Cannot call method 'split' of undefined

@Novy85
Copy link

Novy85 commented Feb 4, 2014

For me work very well,thank you,but a friend of mine has this error: "Uncaught TypeError: Cannot call method 'split' of undefined" ,what is the cause?Can you help me?

@gabrielstuff
Copy link

work like a charm !

@smallfire1112
Copy link

I have this error:
" Uncaught TypeError: Cannot call method 'split' of undefined VM2462:31
xmlhttp.onreadystatechange VM2462:31"

@akshatmittal
Copy link
Author

Hey all!
For all those who get a "Uncaught TypeError: Cannot call method 'split' of undefined" error. Just confirm that you can view your video (go to http://facebook.com/lookback) and then try again. Some people don't get the video and that's why it won't work.

:)

@diskoiteke
Copy link

I dont get it.. What i have to do.. I should dpwnload something or what?

@islem23
Copy link

islem23 commented Feb 5, 2014

i can't get it what i have to do ??

@dvdimagry
Copy link

This code doesn't work right now. Facebook has changed it and those who previously have lost their video now have a new one back.

@minamoru
Copy link

minamoru commented Mar 2, 2014

same......... it's not working !

@gravataLonga
Copy link

Still work, you guys must modified the script. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment