python - Trouble selecting a certain element -


i've written css selector select specific element webpage. upon execution can see selector able locate "genre:" want it's value in case "drama". how can ?

i've tried with:

.mdif li b 

elements within item is:

<div class="mdif"> <ul>     <li><b>genre:</b>drama</li>     <li><b>quality:</b>1080p</li>     <li><b>screen:</b>1920x1080</li>     <li><b>size:</b>1.67g</li>     <li><b>rating:</b>6.1/10</li>     <li><b>peers:</b>17</li>     <li><b>seeds:</b>0</li> </ul> <a href="/movie/55000/download-lake-mungo-2008-1080p-mp4-yify-torrent.html" class="small button orange" target="_blank" title="download lake mungo (2008) 1080p yify torrent">download</a> 

if have correctly been able understand question using

var text_val = $('.mdif').children('genre').text(); 

will select value considering have id each example:

html:

<div id='first'>     <div id='genre'>drama</div>     <div id='quality:'>1080p</div>     <div id='screen:'>1920x1080</div>     <div id="size:">1.67g</div>  </div> 

css:

var text_val = $('.mdif').children('div').text(); 

you can check here jsfiddle

if looking else please specify. thank you.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

.htaccess - ERR_TOO_MANY_REDIRECTS htaccess -