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

Use lib "requests" for downloading #8

Closed
jmansilla opened this issue Dec 15, 2014 · 2 comments
Closed

Use lib "requests" for downloading #8

jmansilla opened this issue Dec 15, 2014 · 2 comments

Comments

@jmansilla
Copy link

I'm right now making use of https://pypi.python.org/pypi/requests-cache which creates a cache of the downloaded stuff magically, and it's awesome. So, I would like to be able to take advantage of it using demiurge.

I don't know if just as an option or as a replacement of pyquery downloader.

What do you think?

@matiasb
Copy link
Owner

matiasb commented Dec 15, 2014

PyQuery will make use of requests if available (https://pythonhosted.org/pyquery/scrap.html), and so is demiurge (you can even specify requests params as Item meta options, like auth or headers).

So, if you install requests-cache in your env and set it up as usual, all demiurge (ie. PyQuery) requests should go through requests and be cached. At least that's what I would expect :-)
Didn't try yet, let me know if you can confirm that.

@jmansilla
Copy link
Author

Ups. You are right.

Thanks Mati.

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

No branches or pull requests

2 participants