我的mv.python:
import scrapy
from scrapy import cmdline
from module3.module3.items import Module3Item
class MvSpider(scrapy.Spider):
name = "mv"
allowed_domains = ["www.dytt8.net"]
start_urls = ["https://www.dytt8.net/html/gndy/dyzz/index.html"]
def parse(self, response):
a_list = response.xpath('//td[@height="26"]/b/a')
for a in a_list:
# print(td)
name = a.xpath('./text()').extract_first()
href = 'https://www.dytt8.net' &