get href scrapy xpath
# with xpath
//div[@class='image']/a[1]/@href
# using css
Link = response.css('span.title a::attr(href)').getall()
get href scrapy xpath
# with xpath
//div[@class='image']/a[1]/@href
# using css
Link = response.css('span.title a::attr(href)').getall()
scrapy get inside attribute value
#Given
<time datetime="2020-09-01T11:48:24-03:00" itemprop="datePublished">a given text</time>
# to get the attribute value datetime:
getData = response.css('time::attr(datetime)').get()
# output
'2020-09-01T11:48:24-03:00'
scrapy get raw html content of selector innerhtml
response.xpath('//*').get()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us