Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

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

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

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants