-
Notifications
You must be signed in to change notification settings - Fork 106
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
setup_config() got an unexpected keyword argument 'url' #45
Comments
Hi, I believe 'url' should be 'project_url' |
When I do that, I get:
|
Try it out simply as documented. from pywebcopy import save_webpage
save_webpage(
'http://example-site.com/',
project_folder='path/to/downloads',
project_name='xyz',
bypass_robots=True
) |
I was able to get it to work by using project_url for setup_config and then changing it back to url for save_webpage. Something like this:
|
Ok cool. from pywebcopy import save_webpage
save_webpage(
'http://example-site.com/',
project_folder='path/to/downloads',
project_name='xyz',
bypass_robots=True
) The function |
@rajatomar788 I need to set custom cookies. How would I do that with your approach? Also, can you fix your README example and/or fix the API? |
If you need to set cookies then just import the SESSION variable from pywebcopy then configure it and continue as above. import requests
from pywebcopy import SESSION
cookie_obj = requests.cookies.create_cookie(domain='www.domain.com',name='COOKIE_NAME',value='the cookie works')
SESSION.cookies.set_cookie(cookie_obj)
# rest of the code as above... |
Python version: 3.7.7
I'm using the same code as in the README, but I'm getting the following error when running it:
This is the code:
What am I doing wrong?
The text was updated successfully, but these errors were encountered: