import scrapy class FundSpider(scrapy.Spider): name = 'fund_spider' allowed_domains = ['fund.eastmoney.com'] start_urls = ['https://fund.eastmoney.com/jzzzl.html'] def parse(self, response): rows = response.css('table#oTable tbody tr') for row in rows: item = { '序号': self.get_value(row, 'td.xh::text'), '基金代码': self.get_value(row, 'td.bzdm::text'), '基金简称': self.get_value(row, 'td.tol a::text'), '2024-11-07单位净值': self.get_value(row, 'td:nth-child(6)::text'), '2024-11-07累计净值': self.get_value(row, 'td:nth-child(7)::text'), '2024-11-06单位净值': self.get_value(row, 'td:nth-child(8)::text'), '2024-11-06累计净值': self.get_value(row, 'td:nth-child(9)::text'), '日增长值': self.get_value(ro
scrapy爬取天天基金网-每日开放式基金净值表
于 2024-11-08 15:50:26 首次发布