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

request functionality: add cookie-Support #186

Open
grince opened this issue Apr 22, 2021 · 4 comments
Open

request functionality: add cookie-Support #186

grince opened this issue Apr 22, 2021 · 4 comments

Comments

@grince
Copy link

grince commented Apr 22, 2021

Hi,

some comics have different images wether you are logged in or not. would it be possible to add cookie-support for a scraper, so I can either set various cookies within the scraper definition or head to a cookies.txt-file which contains all necessary cookies?

@TobiX
Copy link
Member

TobiX commented Apr 22, 2021

Since we are using https://docs.python-requests.org/en/master/ basic cookie support is already there. See for example the webtoons module:

self.session.cookies.set('ageGatePass', 'true', domain='webtoons.com')

Injecting additional cookies via a command line option would probably a nice extension to this feature...

@grince
Copy link
Author

grince commented Apr 22, 2021

well - webtoons doesn't use _basicscraper, so I have to fiddle around a little bit. maybe I'll find a way to inject it with basicscraper.

@TobiX
Copy link
Member

TobiX commented Apr 22, 2021

_BasicScraper is basically deprecated, but the HTTP part should neverless work the same way regardless of scraper base class.

@grince
Copy link
Author

grince commented Apr 22, 2021

Ah, good to know. then I'll try ParserScraper, since that seems to be the better choice. Thanks for the information!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants