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

Added an option to save the cookie file to be used with cURL #177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MuntashirAkon
Copy link

@MuntashirAkon MuntashirAkon commented Nov 6, 2018

Added an optional argument curl_cookie_file to CloudFlareScraper.get_tokens() in order to export the two cf cookies in a file that can be directly used with cURL.

@Anorov
Copy link
Owner

Anorov commented May 11, 2019

The cf_clearance cookie is fairly short-lived. I don't think there's a need for this. Saving the cookies to disk for curl to repeatedly use will just lead to problems once cf_clearance expires.

@Anorov Anorov closed this May 11, 2019
@MuntashirAkon
Copy link
Author

It's okay if you think this modification is irrelevant. In my case where the automation system involves multiple programming languages, this modification is a general necessity. Also, however short lived the cookie is it's a bad idea to generate them every time you make a request to the server (it's fairly time consuming). Of course, the user of this tool should already know that this cookie is short lived. Otherwise, they would've used tools like pycookiecheat to get the cookies straight from the Chromium browsers.

@Anorov
Copy link
Owner

Anorov commented May 12, 2019

That's reasonable. I'll reopen this but I'd like to reimplement it myself with a different API.

@Anorov Anorov reopened this May 12, 2019
@MuntashirAkon
Copy link
Author

OK.

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

Successfully merging this pull request may close these issues.

None yet

2 participants