gpt4free icon indicating copy to clipboard operation
gpt4free copied to clipboard

phind cf_clearance and user_agent

Open xtekky opened this issue 1 year ago • 5 comments

As phind has not fixed its site yet, I still have some time till i take down code related to it, I will be adressing this issue, please read through these instructions by @joeysantana3

Disclaimer: this is what worked for me, not sure this is the right way...

If you follow the setup instructions on the main page, one of the steps is copying/moving streamlit_app.py to the main folder and then running it. After you copy it, open up the streamlit_app.py file in a text editor.

You should see two lines in the python script, phind.cf_clearance = ... and phind.user_agent = ....

Go to https://www.phind.com/ in your web browser and open developer tools. Go to storage -> Cookies -> then select the phind.com cookie. You should see cf_clearance in the cookie data. Copy that value and replace whats in the streamlit_app.py file with your value. For the user_agent value, you need to copy and paste the user agent identifier of the browser you used to access the site. There are a few ways to get your browser user agent, but one way is to go to the network tab of the developer tools, select a row (may need to refresh the page), then in the Headers section you should see request header. Your user-agent is there.

Screenshot from 2023-04-26 17-55-17 Screenshot from 2023-04-26 17-55-37 end.

Note, there is a site called google.com that (wow crazy) can explain to u where you can get a cf_clearance token, just search "how to get my cf_clearance token" and you will see tutorials !!!

xtekky avatar Apr 27 '23 11:04 xtekky