[featured_image]
Download
Download is available until [expire_date]
  • Version
  • Download 0
  • File Size 4.00 KB
  • File Count 1
  • Create Date March 27, 2022
  • Last Updated March 27, 2022

myspider.py

import scrapy
class QuotesSpider(scrapy.Spider):
name = "duykhang"
start_urls = [
'https://duykhang.com',
]

def parse(self, response):
for posts in response.css('div.post-wrapper article'):
yield {
'Title': posts.css('h2.entry-title a::text').get(),
'Description': posts.css('div.post-content p::text').get(),
'Date': posts.css('time::text').get(),
}

Chia sẻ:

Bình luận đi nào: