Uses Facebook's debugging tool to bypass CAPTCHA and other blacklists.
pip install fecho
The cookie can be extracted using the EditThisCookie browser extension. Just export the cookies after logging into Facebook.
fecho --url 'https://www.google.com/search?q=sample+query' --cookie '[
{
"domain": ".facebook.com",
"expirationDate": 1597023793.932123,
"hostOnly": false,
"httpOnly": false,
"name": "c_user",
"path": "/",
"sameSite": "unspecified",
"secure": true,
"session": false,
"storeId": "0",
"value": "",
"id": 1
},
...
]'
from fecho import Client
COOKIE = """
[
{
"domain": ".facebook.com",
"expirationDate": 1597023793.932123,
"hostOnly": false,
"httpOnly": false,
"name": "c_user",
"path": "/",
"sameSite": "unspecified",
"secure": true,
"session": false,
"storeId": "0",
"value": "",
"id": 1
},
...
]
"""
client = Client(COOKIE)
response = client.get("https://www.google.com/search?q=test")
print(client.unescape(response.text))
This project was inspired by s0md3v/goop