-
Notifications
You must be signed in to change notification settings - Fork 691
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
ProxyAdded proxy option + proxy sanity checks #277
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @holzkohlengrill, thank you for the PR.
Could you please see the comment on the changed file?
safaribooks.py
Outdated
if USE_PROXY: # DEBUG | ||
self.session.proxies = PROXIES | ||
self.session.verify = False | ||
if args_parsed.proxies: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use self.args
instead of global args_parsed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lorenzodifuccia please check. I removed now completely the global arguments and packed it into some functions to avoid errors like this and make it more readable.
@lorenzodifuccia anything open or can we merge? |
Hi @holzkohlengrill, I thought I sent the request change, sorry 🤦🏻♂️ |
The Proxy args and code it's ok. |
I changed it because it was very messy and error prone due to a mix of global and local arguments, etc. |
Added proxy option as a command line argument.
Added checks to make sure the proxy URL is valid.