When using cheerio to parse HTML, what if you cycle out the selected elements?

although the cheerio syntax is similar to jQuery, when jQuery selects an element:

$(".class")

returns a jQuery object, and we can get each .class element through an array

$(".class")[1].find("selector").xxxx

however, cheerio cannot use the above method and will prompt find is not a function.

in Python, using BeautifulSoup also returns an array of HTML objects, which makes it easy to loop out all the elements and wonder if node has any related methods.


$('.class').eq(index)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea66ee-1dd7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea66ee-1dd7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?