-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://gnmerritt.net/deletefacebook/2018/04/03/fb-photos-of-me/ #1
Comments
Hey Nathan - thanks so much for putting together this useful post. I've been looking for a good way to download photos others have tagged me in, so I can wash my hands of FB. I need some help though; I managed to succesfully execute all the steps but I'm confused about the shell command bit. After I've created and saved the text file containing the javascript, what do I do? Where am I meant to type the command, and in what format exactly do I insert the file path into the command? How do I choose where I would like the files to be saved? Sorry, I'm a real novice with a lot of this stuff. I'd appreciate any pointers. Thanks! |
Hi Nathan, thanks for the instructions. I created the text file with the output from the javascript snippet and called it myfbphotos.txt and saved it on my Desktop Then I opened my terminal (I'm on a mac) and ran the following command: cat Desktop/myfbphotos.txt | sed -E 's/VM[[:digit:]]+:[[:digit:]]+ //' | xargs -n1 -P4 wget But when I run the command I get "xargs: wget: No such file or directory". Am I going about this the wrong way? Kind regards, |
@ftaneski You'll need to make sure the @thehappycollector You'll want to be running the commands in the cd ~/Desktop # navigate the terminal to the right folder. cd = 'change directory'
ls # ls = 'list files' this will show you a list of all the files in your Desktop folder, make sure you see your photos file
mkdir fb_photos # make a directory for your photos
cd fb_photos # navigate the terminal there
cat ../fb-photos.txt | sed -E 's/VM[[:digit:]]+:[[:digit:]]+ //' | xargs -n1 -P4 wget
open . # opens up the folder you created in Finder |
Nicely done, great info. Thanks for sharing! One comment: the procedure to download all photos you’re tagged in, results in downloading pictures smaller than the actual photo resolution that facebook has. Its not a thumbnail, but neither is the actual picture. Will look into options to get to the final photos... This part of the photos you're tagged in, is the most difficult to solve in general when trying to retrieve the data out of fb. |
Sorry just now I found yuor final TODO note regarding the same thing I noted. I will check on it too. |
Thanks! Let me know if you come up with a reliable way to find higher-res versions of photos given the media id or anything else we can scrape off the page. I tinkered around with it for a while and didn't make any progress... |
Got it. To get the full size photo, given an fbid, we can use the following url: Now, following your snippet on the console approach, we can collect all fbids using: Or even better, we can get the list ready to paste into a file with: Thanks! |
Now to a more mundane challenge: what to use to download that image list, which requires fb login and redirection following... |
Hey I made an account to comment this. I'm hoping someone can help me out. I found my facebook id, then I loaded up all my tagged photos using the link provided. Now I'm at this part: "Next, pick out all the images on the page with this javascript snippet: I have no idea what this means whatsoever. Like, wouldn't know where to start. Can someone help me? Really want to delete facebook. I'm using a mac if that matters. In addition to this, I noticed in the comments there's a solution to the problem in the original post where the photos don't download at the full resolution. If someone could help me with this too it would be so appreciated! |
Hi, thanks so much for publishing this. Really helpful stuff. @gnmerritt I'm getting stuck at a similar point to others. I've created the code file, but don't know how to apply the final bit of code to download the pictures. As a Windows user, do I use 'Command Prompt'? Do I need to download homebrew and wget too? When I open 'Command Prompt' I have an intro of 'C:\User\Hp840>' - can I type commands directly after this? I'm a total novice with coding, so if anyone could paste a screenshot of exactly what to type I'd be really grateful. I was pasting this into command prompt and getting no where: cat <C:\Users\Hp840\Documents\fb-pic-code.txt> | sed -E 's/VM[[:digit:]]+:[[:digit:]]+ //' | xargs -n1 -P4 wget @patrickconneely - you can open a javascript console on a page by pressing 'ctrl' + 'shift' + 'j'. This is where you paste in the code to get the information to paste into a text file. Does that work? I don't really know what I'm talking about either! |
Hey everyone. So I got all the way to the end, all the pictures seemed to download, but where do they download to? Thanks! |
Anyone? |
Thanks so much for this. When I attempt using a shell in MacOS I get a 403: forbidden error. I've tried all the "user-agent" tricks and none work... any suggestions? |
I keep getting errors 403 forbidden errors. Anyone else getting that? How do I get around that? |
Sorry everybody, I have long since deleted my account so I'm not able to verify whether or not this still works. If you drop me a line ( |
@Novack Now, following your snippet on the console approach, we can collect all fbids using: Or even better, we can get the list ready to paste into a file with: could you please explain this further? -- |
@SirRodneySmodge I think I've figured something out to get the full-size photos :) on this same page, click on the first picture to open the "spotlight": copy/paste this into your console and let it run free!
it's a bit finicky at times (i.e., got stuck on a photo and wouldn't advance to the next one) at which point you can first stop the script from running using this:
then close out of the spotlight, open it up again at the photo it got stuck on, and start the script again from the I also noticed the photos were downloading with the query params, so I ran this in my terminal as a final step to get OS X to recognize them as image files:
note: had to run let me know if any of that doesn't make sense! unfortunately Facebook never had the highest resolution for images, but I can confirm from one photo at least that using "Download" from the Facebook UI yielded the same photo as the script above. |
Thank you! It worked!
…On Tue, 25 Dec 2018 at 02:11, Casey Klimkowsky ***@***.***> wrote:
@SirRodneySmodge <https://github.com/SirRodneySmodge> I think I've
figured something out to get the full-size photos :)
on this same page, click on the first picture to open the "spotlight":
https://www.facebook.com/search/YOUR_ID_NUM_HERE/photos-of/intersect
copy/paste this into your console and let it run free!
let interval;
interval = setInterval(() => {
console.log(document.querySelector('._2-sx').firstElementChild.getAttribute('src'));
document.querySelector('a.next').click();
}, 1000);
it's a bit finicky at times (i.e., got stuck on a photo and wouldn't
advance to the next one) at which point you can first stop the script from
running using this:
clearInterval(interval);
then close out of the spotlight, open it up again at the photo it got
stuck on, and start the script again from the interval = ... line.
I also noticed the photos were downloading with the query params, so I ran
this in my terminal as a final step to get OS X to recognize them as image
files:
rename 's/\?_nc_cat.*//g' *
note: had to run brew install rename first
let me know if any of that doesn't make sense! unfortunately Facebook
never had the highest resolution for images, but I can confirm from one
photo at least that using "Download" from the Facebook UI yielded the same
photo as the script above.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ar5t6p8-NesU3RRe45eiGmZlarfgXgNdks5u8W09gaJpZM4U89TY>
.
|
@caseklim +1 on the thanks - that worked great! |
@SirRodneySmodge @mikeclarkeuw glad to hear it!! another thing-- it seemed to skip some photos at 1,000 ms, so I changed the |
@caseklim Hello, I am trying to follow all the steps, however, this link https://www.facebook.com/search/YOUR_ID_NUM_HERE/photos-of/intersect is not working for me anymore. Which one did you use? Thank you very much in advanced! :) |
Hello! That link with your FB ID inserted where it says “YOUR ID NUM HERE”
should bring up all your photos on one page
…On Sun, 20 Jan 2019 at 02:55, Puigdo ***@***.***> wrote:
@caseklim <https://github.com/caseklim> Hello, I am trying to follow all
the steps, however, this link
https://www.facebook.com/search/YOUR_ID_NUM_HERE/photos-of/intersect is
not working for me anymore. Which one did you use? Thank you very much in
advanced! :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ar5t6koXsQZldNGnLc8_jVdLdrd04U-Xks5vE75-gaJpZM4U89TY>
.
|
Hello @SirRodneySmodge , I replaced my FB ID but it says that it's not a valid link. The FB ID that I put on it is correct. Maybe I should modify something else from this link? |
@Puigdo try using just the regular "Photos of Me" page! |
Hi, This doesn't seem to be working for me, as it downloads the html but not the photo. The code I am running in powershell: \code Can anyone verify if it still works on Unix OS, or windows and I am doing something wrong? |
My solution works for Windows 10, no powershell, just a website, a chrome extension and your finger. If no one else has mentioned if you are using chrome, pressing F12 then selecting Console, this is the window they are having you enter the above text into, it will spit out your links. Thanks to @SirRodneySmodge for the following as i used it and it worked: The console in chrome spits out the list and I copy and pasted it into notepad, and using find and replace to remove the non-URL text, example "2VM364:1 " i cleaned the document up. Then i went to: Then, i used the Tab save extension once they have all finally opened to download them: The only downside to this method is that you have to click save over and over for every photo but, that didn't take me too long for my 300 photos... you could always script something to click it if you had thousands of photos. |
Hi! I created a script that worked for me. A little Python understanding may be required, specially in case one wants to adapt the solution to their own needs. The code is available here: https://github.com/xaviripo/fmpd. Edit: I have been working on refining this a bit; now it uses TypeScript (Deno) instead of Python. Take a look if you need to download big amounts of pictures using their FBIDs. |
@xaviripo thanks this tool saved me a lot of time! |
Yeah, that link doesn't seem to work anymore (and yes, I've inserted my FB ID number into the URL). Anyone have an idea for a new one? |
@AmeliaMN, I got in and got all of my links, I'm having trouble with the import using wget, but I'm working on it. I did this from chrome, i'm not sure how it works in other browsers: To get the photo locations that he is telling you to copy into a txt file,, navigate to your facebook page, and go to "photos" this should open up the page view where you can see the "photos of you" scroll all the way to the bottom so that all of the "photos of you" are visable right click anywhere on the screen (if you're using chrome) and select "inspect" on the right hand side of the screen you'll see the web developer screen, at the top of it, select 'console' you'll get a bunch of "OMG DON"T DO IT! SOMEONE IS HACKING YOU!!!" message, you can clear this by clicking on the little "no" sign (think "no smoking sign" etc) on the top right, this will clear your console and leave you with a white page. in the blank space, paste the link provided above by @Novack : for (link of document.getElementsByTagName('a')) { if (!link.href.includes("?fbid=")) continue; console.log("https://m.facebook.com/photo/view_full_size/?fbid=" + new URL(link.href).searchParams.get("fbid")); } this will give you a list of all of the pictures by their web address, copy and paste it into a .txt file i'm stuck on getting wget to extract them to my pc, but I'm hopeful I can get it figured out soon (anyone who has any ideas, I'd love to hear them!) |
@xaviripo , I'm attempting to run your script, getting the following error (sorry, I'm not familiar with python, and only minimally competent in ruby. Any help you can give would be appreciated!): File "C:\Program Files (x86)\fmpd-master\download.py", line 24, in |
@realmikeclarke So sorry for the unorthodox contact method but I'd really love to talk to you about whether I could take over your domain name. Have you seen my comment come through on your blog? It would really help me gain traction with my small business. Let me know if you're willing to talk through the options. -Hilary D. |
Worked for me today https://gist.github.com/theJohnnyBrown/cfc7b500cc3c921fda83c4cea1b59607 |
Downloading Photos of You from Facebook
https://gnmerritt.net/deletefacebook/2018/04/03/fb-photos-of-me/
The text was updated successfully, but these errors were encountered: