Q:

Scrapy next href with rel="next"

on the Scrapy example i found this line 

 next_page = response.css('div.prev-post > a ::attr(href)').extract_first()

Now i wan't select the first 
So i will extract the first link where have a 'rel="next"' on it.
I try it with

next_page = response.css('div.prev-post > a[@rel="next"] ::attr(href)').extract_first()

But its dont work.
How i can do that?
Thanks
Joni

A:

you are combining css selector with xpath selectors.
with css:
'a[rel="next"]::attr(href)'

with xpath
'//a[@rel="next"]/@href'

