【发布时间】:2017-03-11 04:15:57
【问题描述】:
最近刚开始使用 Scrapy,到目前为止,我一直很幸运,直到这个问题。我似乎无法在这里“找到”积分榜;
http://www.baseball-reference.com/leagues/MLB/2016-standings.shtml#all_expanded_standings_overall
它的 id = '#expanded_standings_overall' 但我无法在我的蜘蛛或 shell 中找到它。我能够得到 #all_expanded_standings_overall 的结果,因为有一个具有该 ID 的 div。在 shell 中提取它向我展示了我想要的表,但即使在其中我也无法使用 'tbody' 或 'tr' 或我尝试过的其他任何东西找到它。
【问题讨论】:
-
您能否发布您的尝试,以便我们查看您哪里出错了?
-
@Hannah,我什至不知道该给你看什么?如果我做scrapy shell thatsite.com然后输入response.css('#expanded_standings_overall')返回[]。我完全迷失了为什么它找不到那个ID?这与我已经在该域中找到其他几个类似表的方式相同。