Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 10-13-2010, 11:53 PM   #1
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
Puzzled and need a little kick start

If I have something like this. Ignore the actual html formatting. It is used to give you a general idea of what I want to do.
Code:
<table class ='i hate tables'>
  <td align = 'left'>
      <a href='some link blah.com/blah.html></a>
  <td align = 'left'>
      <a href='some other link that i actually want to use> </a>
</table>
How would I get the second element inside the table?
Would i do a for item findAll on the table class ='i hate tables' ? then do a item.next.next ? I'm confused. Because the link I wish to parse is the second element of the table.

thanks.
TonytheBookworm is offline   Reply With Quote
Old 10-13-2010, 11:55 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,653
Karma: 24966646
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
table.findAll('td')[1]
kovidgoyal is offline   Reply With Quote
Advert
Old 10-14-2010, 12:10 AM   #3
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
Quote:
Originally Posted by kovidgoyal View Post
table.findAll('td')[1]
Aww, thank you so much
TonytheBookworm is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Something to kick-start me again...? MrPLD Reading Recommendations 15 10-06-2010 12:56 AM
Puzzled re country content USA/UK/France PeterEvans Amazon Kindle 11 09-17-2010 05:09 AM
PRS 300 Puzzled - please help! fester1 Sony Reader 5 01-01-2010 08:14 PM
Puzzled by contrast variations in e-ink Sunspark News 3 12-15-2009 04:53 AM
Did an ereader help kick start a reading habit manchuia Which one should I buy? 24 07-04-2008 11:12 PM


All times are GMT -4. The time now is 09:24 AM.


MobileRead.com is a privately owned, operated and funded community.