This response.xpath statement is returning an empty array and I'm not too sure why. I'm trying to retrieve @alt result. This is what I have tried...
response.xpath('//*[@id="all_teams_war_images"]/div/a/img/@alt').extract()
Oddly enough this returns all elements within that div
response.xpath('//*[@id="all_teams_war_images"]').extract()
this is the website I am trying to scrape https://baseball-reference.com/teams/BOS/2018.shtml
'//*[@id="all_teams_war_images"]/div/a/img/@alt'is looking only in the first child<div>underneath the element with that id, which does not contain any<a>elements. How did you get that xpath? Did you type it by hand? - John Gordon