I have a table with stats about a match. I have extracted the tables and I can get all the different fields from the table.
I would like to do something like this:
|__Team Name
|__Logo
|__Players
|___Different Players and their stats
I would like to know how to combine and yield these classes. So that Team class has all the players and Player class has it's individual stats '''python
class Team(scrapy.Item):
Team_name = scrapy.Field()
Logo = scrapy.Field()
# Other Fields
#Players = all the players
class Player(scrapy.Items):
Shots = scrapy.Items()
Assists = scrapy.Items()
# Other Fields
I am scraping the table from "https://www.hltv.org/stats/matches/mapstatsid/90415/trz-vs-eox"
Note: I want to configure my pipeline so that I can run scrapy crawl genspider -o (file of players with a column of which team they belong) and similarly scrapy crawl genspider -o (file with team with a 5 columns as P1,P2,P3 with players of the team too