-2

我正在尝试选择具有频道、艺术家、歌曲等的第一行。我不确定如何选择它?

这是网站:

http://www.dogstarradio.com/search_playlist.php?artist=&title=&channel=51&month=&date=&shour=&sampm=&stz=&ehour=&eampm=

我试过了

$("td:contains('51')") 但这不起作用。

最终,我希望能够选择后面的行。

---- 这是我要抓取的 html,但没有真正的唯一标识符,例如类或元素,并且有多个表、行和表数据

    <center>This search includes data from 12:00:00 AM 9/30/2013 to 6:05:18 PM 10/6/2013<br>

    <table><tbody><tr><td colspan="5"><div id="light" class="white_content"></div></td></tr><tr><td>
&nbsp;</td><td colspan="3">Search results 1 to 50 of 2441 total matches</td><td><a href="search_playlist.php?artist=&amp;title=&amp;channel=51&amp;month=&amp;date=&amp;shour=&amp;sampm=&amp;stz=&amp;ehour=&amp;eampm=&amp;resultcount=2441&amp;page=1">Next<br>Page</a></td></tr><tr><td class="channel">Channel</td><td class="channel">Artist</td><td class="channel">Title</td><td class="channel">Date</td><td class="channel">Time</td></tr>

下面的行:(位于顶部和底部html的中间)

<tr><td>51</td><td>Swanky Tunes+Dvbbs+Eitro</td><td><a href="#Swanky+Tunes%2BDvbbs%2BEitroWe+Know" onclick="seeqpodSearch('Swanky+Tunes%2BDvbbs%2BEitro','We+Know')">We Know</a></td><td>10/5/2013</td><td>3:00:05 AM</td></tr>

--

<tr><td>51</td><td>Stefan Biniak</td><td><a href="#Stefan+BiniakJohnny+Rotten+Bootleg" onclick="seeqpodSearch('Stefan+Biniak','Johnny+Rotten+Bootleg')">Johnny Rotten Bootleg</a></td><td>10/5/2013</td><td>2:54:46 AM</td></tr>
<tr><td>51</td><td>Tiesto+Dyro</td><td><a href="#Tiesto%2BDyroParadise" onclick="seeqpodSearch('Tiesto%2BDyro','Paradise')">Paradise</a></td><td>10/5/2013</td><td>2:50:12 AM</td></tr>
<tr><td>51</td><td>@ClubLifeRadio</td><td><a href="#%40ClubLifeRadioTop+40+Countdown" onclick="seeqpodSearch('%40ClubLifeRadio','Top+40+Countdown')">Top 40 Countdown</a></td><td>10/5/2013</td><td>2:49:48 AM</td></tr>
</tbody></table>
4

1 回答 1

2
var row = $('td.channel:first-child').parent().next();

会让你整行。

编辑

要获得以下行,类似于

While(row.not(':last-child')){
    Do stuff. 
    row = row.next();
} 
于 2013-10-06T21:59:23.043 回答