Skip to content
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

Errors when running command line #4

Closed
jessekirbs opened this issue Nov 29, 2020 · 11 comments
Closed

Errors when running command line #4

jessekirbs opened this issue Nov 29, 2020 · 11 comments

Comments

@jessekirbs
Copy link

Getting the following error:

error: Uncaught (in promise) Http: error sending request for url (https://m.facebook.com/photo/view_full_size/?fbid=10152897431185895): http2 error: user error: header too big
at processResponse (core.js:223:11)
at Object.jsonOpAsync (core.js:240:12)
at async fetch (deno:op_crates/fetch/26_fetch.js:1274:29)
at async fetchFacebook (fetch.ts:27:10)
at async fetchRedirect (fetch.ts:9:20)
at async download (mod.ts:117:17)
at async main (mod.ts:71:3)
at async mod.ts:218:3

Any idea what the issue is? Thanks!

@xaviripo
Copy link
Owner

I'm just realizing that the program tries to send through all cookies in the cookies.txt file... Which is bad for a couple of reasons.

Try the following: when exporting the cookies, export just those for Facebook's domain facebook.com, and try again.

@xaviripo
Copy link
Owner

Okay, I've just updated the program to only send Facebook cookies. Could you try again without redownloading your cookies, to see if it works properly now?

@jessekirbs
Copy link
Author

jessekirbs commented Nov 29, 2020

Same issue - 'header too big' error as in my first post. Should I try logging in and redownloading cookies?

EDIT: After logging in and redownloading cookies.txt, I get this error:

error: Uncaught (in promise) Error: The filename, directory name, or volume label syntax is incorrect. (os error 123)
at processResponse (core.js:223:11)
at Object.jsonOpAsync (core.js:240:12)
at async Object.lstat (deno:cli/rt/30_fs.js:208:17)
at async exists (exists.ts:7:5)
at async download (mod.ts:141:12)
at async main (mod.ts:71:3)
at async mod.ts:218:3

@xaviripo
Copy link
Owner

Okay, this new error means that the cookies thing was fixed by redownloading them.

Now the issue seems to be that the file names are invalid when trying to save them to disk. I take it from that error that you're using Windows. Are you running the command as presented in the README.md file, or are you running some variation with custom arguments?

@jessekirbs
Copy link
Author

jessekirbs commented Nov 30, 2020

Windows 10. Just the README.md version:

deno run --unstable --allow-net --allow-read --allow-write https://raw.githubusercontent.com/xaviripo/fmpd/master/mod.ts - < fbids.txt

@xaviripo
Copy link
Owner

Okay, I finally got time to test it on Windows. Turns out I mixed up some variables and in Windows this caused \r to appear at the end of each FBID, messing everything up.

I uploaded the fix, try again now.

@jessekirbs
Copy link
Author

Looks like same issue:

error: Uncaught (in promise) Error: The filename, directory name, or volume label syntax is incorrect. (os error 123) at processResponse (core.js:223:11) at Object.jsonOpAsync (core.js:240:12) at async Object.lstat (deno:cli/rt/30_fs.js:208:17) at async exists (exists.ts:7:5) at async download (mod.ts:141:12) at async main (mod.ts:71:3) at async mod.ts:218:3

@xaviripo
Copy link
Owner

Try passing --reaload to deno run in order to re-download FMPD:

deno run --reload --unstable --allow-net --allow-read --allow-write https://raw.githubusercontent.com/xaviripo/fmpd/master/mod.ts - < fbids.txt

@jessekirbs
Copy link
Author

That did the trick, thank you! It looks like it's not pulling all my photos for some reason - I'm assuming it has to do with how I pulled the FBIDs. Can you please recommend the best method?

@xaviripo
Copy link
Owner

xaviripo commented Dec 1, 2020

Are you getting any errors in the console when downloading the pictures?

Make sure that each line of your fbids.txt contains a single FBID (supposedly, a string of numbers) and no extraneous symbols.

I created this script to download the pictures I had been tagged in, to do that you can follow the link in the README.md (this one). In that discussion thread there may be other tips on how to get the FBIDs.

Edit: a little bit more detail:

  1. Open up the album/list of photos you want to download from Facebook (e.g. "Photos of You").
  2. Make sure to scroll down all the way, until all photos have appeared on your screen. This is important, as the method of retrieving the FBIDs depends on the links to the photos having been loaded.
  3. Enter this in your developer console (F12):
console.log([...document.getElementsByTagName('a')].filter(link => link.href.includes("?fbid=")).map(link => new URL(link.href).searchParams.get("fbid")).join('\n'))

(It's generally not a good idea to copy and paste strangers' code into your console, so I recommend you try and understand what this does.)

You should get a list of FBIDs ready to copy and paste into your fbids.txt file. Again, make sure that no other characters get copied at the beginning or the end.

@xaviripo
Copy link
Owner

xaviripo commented Dec 6, 2020

Seeing as the original issue has been solved, I'm going to close this. If you have further trouble with getting the FBIDs or running the program, please open another issue.

@xaviripo xaviripo closed this as completed Dec 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants