Hello,
sure you can use PyQuery.
Callbacks get passed HTTP responses, which are `scrapy.http.HtmlResponse`
most of the time,
so you do something like
from pyquery import PyQuery as pq
...
class MySpider(Spider):
...
def parse_page(self, response):
d = pq(response.body_as_unicode())
# or if you're using Scrapy 1.1(rc3)
# d = pq(response.text)
Hope this helps.
Paul.
On Tuesday, April 19, 2016 at 1:18:03 PM UTC+2, Sayth Renshaw wrote:
>
> Hi
>
> Is it possible to use Pyquery in scrapy so i can get the easy jquery
> selector syntax but then use the scrapy pipelines to manage data?
>
> The pyquery options made selecting so easy just wanted to see if i could
> get the benefits of both the scrapy framework and the easy selectors.
>
> Cheers
>
> Sayth
>
>
--
You received this message because you are subscribed to the Google Groups
"scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.