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

Allow for a custom User-Agent header at runtime #33

Open
jdoss opened this issue Oct 12, 2021 · 4 comments
Open

Allow for a custom User-Agent header at runtime #33

jdoss opened this issue Oct 12, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@jdoss
Copy link

jdoss commented Oct 12, 2021

Facebook seems to be rate limiting hard for anyone that uses this program. They might be looking at requests that are coming into https://mbasic.facebook.com and checking the User-Agent header which defaults to Go-http-client/1.1 in net/http and blocking people.

Allowing a user to set a random common User-Agent at runtime might help with the rate limiting.

@G2G2G2G
Copy link

G2G2G2G commented Oct 12, 2021

Agreed, alternatively randomize them. This has several hundred (maybe thousand) for every os, console, browser, etc: https://github.com/ray-lothian/UserAgent-Switcher/

Also facebook used to store real time cookies for screen size. Now it's a periodically updated cookie called "wd" it's likely they still do it real time somewhere else, implementing that would require executing their javascript though...
scratch that, just realized it's the mbasic one being used which doesn't have the wd cookie.. it's more likely we're going to see facebook rate limit mbasic as a whole rather than allow people to use this lmao

@marcelja
Copy link
Owner

What about we start by setting the user agent to a very common one?

@ullbergm
Copy link

I did some testing and I didn't have much luck when changing the User-Agent header. I did get different failure scenarios depending on the User-Agent I sent so i think the code works. If you have better luck, please let me know.

https://github.com/ullbergm/facebook-delete

@marcelja
Copy link
Owner

I played around with some user agents. I only received error pages. That's interesting. I would've expected it the other way around.

@marcelja marcelja added the enhancement New feature or request label Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants