Robobrowser在第一次关闭标签时停止

时间:2016-03-22 00:52:55

标签: html python-2.7 beautifulsoup html-parsing robobrowser

我正在尝试用robobrowser解析一个网页,其中一些html如下:

-webkit-transform: perspective(1px) scale(1.1);
  transform: perspective(1px) scale(1.1);

然而,当我尝试使用<table class="lineScore mlbBoxScore postEvent"><tr class="gameInfo"> <tdclass="gameStatus"></td><td class="finalStatus" colspan="12">Final Top 9th</td></tr><tr class="periodLabels MLBHOU"><td></td><td><div>1</div></td> <td><div>2</div></td><td><div>3</div></td><td><div>4</div></td><td> <div>5</div></td><td><div>6</div></td><td><div>7</div></td><td><div>8</div> </td><td><div>9</div></td><td><div>R</div></td></tr><tr class="teamInfo awayTeam MLBHOU"><td class="teamName"><a href="/mlb/teams/page/HOU/houston- astros"><img delaysrc="http://sports.cbsimg.net/images/mlb/logos/40x40/HOU.png" width="40" height="40" border="0" class="teamLogo"></a><div class="teamLocation"><a href="/mlb/teams/page/HOU/houston- astros">Houston</a> </div></td><td class="periodScore">1</td><td class="periodScore">0</td><td class="periodScore">0</td><td class="periodScore">0</td><td class="periodScore">0</td><td class="periodScore">0</td><td class="periodScore">2</td><td class="periodScore">0</td><td class="periodScore">0</td><td class="runsScore">3</td></tr></tr><tr class="teamInfo homeTeam MLBWAS"><td class="teamName"><a href="/mlb/teams/page/WAS/washington-nationals"><img delaysrc="http://sports.cbsimg.net/images/mlb/logos/40x40/WAS.png" width="40" height="40" border="0" class="teamLogo"></a><div class="teamLocation"><a href="/mlb/teams/page/WAS/washington- nationals">Washington</a> </div></td><td class="periodScore">0</td><td class="periodScore">1</td><td class="periodScore">2</td><td class="periodScore">0</td><td class="periodScore">0</td><td class="periodScore">0</td><td class="periodScore">1</td><td class="periodScore">1</td><td class="periodScore">0</td><td class="runsScore">5</td></tr></tr></table> 时 它返回:

find_all(class_="lineScore mlbBoxScore postEvent")

它停在第一个<table class="lineScore mlbBoxScore postEvent"><tr class="gameInfo"><td class="gameStatus"></td><td class="finalStatus" colspan="12">Final 9th</td> </tr><tr class="periodLabels MLBBOS"><td></td><td><div>1</div></td><td> <div>2</div></td><td><div>3</div></td><td><div>4</div></td><td><div>5</div> </td><td><div>6</div></td><td><div>7</div></td><td><div>8</div></td><td> <div>9</div></td><td><div>R</div></td></tr><tr class="teamInfo awayTeam MLBBOS"><td class="teamName"><a href="/mlb/teams/page/BOS/boston-red-sox"> <img border="0" class="teamLogo" delaysrc="http://sports.cbsimg.net/images/mlb/logos/40x40/BOS.png" height="40" width="40"/></a><div class="teamLocation"><a href="/mlb/teams/page/BOS/boston-red-sox">Boston</a> </div></td><td class="periodScore">0</td><td class="periodScore">2</td><td class="periodScore">1</td><td class="periodScore">0</td><td class="periodScore">0</td><td class="periodScore">0</td><td class="periodScore">1</td><td class="periodScore">0</td><td class="periodScore">0</td><td class="runsScore">4</td></tr></table> 标记处。我怎么能阻止这个。这是否与beatifulsoup和其他人一起发生?任何帮助表示赞赏。

编辑:

我现在的代码如下:

</table>

,网址为www.cbssports.com/mlb/scoreboard

0 个答案:

没有答案