我有下面的scrapy代码,从URL中提取信息:
[https://www.fcf.cat/acta/2223/futbol-11/divisio-honor-cadet/grup-1/hc/barcelona-fc-a/hc/damm-cf-a][1]
team1_data = {}
for table in cols[0].css(".acta-table"):
# extract the table heading
table_heading = table.css("thead th::text").get()
table_data = {} # data for this table
if table_heading == "Equip Tècnic":
# coach data
table_data = [] # change to list
for row in table.css("tbody tr"):
table_data.append(
row.css("td.tc::text").get()
)
else:
# players data
for row in table.css("tbody tr"):
player_number = row.css("span.num-samarreta-acta2::text").get()
player_name = row.css("td a::text").get()
table_data[player_number] = player_name
# add to team data
team1_data[table_heading] = table_data
字符串
我想一些帮助添加在预订的情况下提取适当的代码,预订类型和分钟。
谢啦,谢啦
1条答案
按热度按时间mfpqipee1#
我已经想好了:
字符串