Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: web::scraper using an xpath

by jethro (Monsignor)
on Dec 10, 2010 at 10:53 UTC ( #876432=note: print w/ replies, xml ) Need Help??


in reply to Re^2: web::scraper using an xpath
in thread web::scraper using an xpath

Are you sure? In that case I would guess that he must also remove the 'tr' from his further process statements.


Comment on Re^3: web::scraper using an xpath
Re^4: web::scraper using an xpath
by Anonymous Monk on Dec 10, 2010 at 11:17 UTC
    Are you sure? In that case I would guess that he must also remove the 'tr' from his further process statements.

    Yup, I'm sure, and oddly no, there is no need to remove tr.

    It would have been easier to see if ag4ve had posted runnable code , but I adapted eg/dave-trailer-HD.pl

    I have no idea if this is intended behavior of this module

Re^4: web::scraper using an xpath
by ag4ve (Monk) on Dec 10, 2010 at 16:09 UTC

    nope, nothing else needed to be change. that worked perfectly. damned if i know why, but it had the result i was asking for :)

    i'm going to have to read more into xpath... what would be cool is i could figure out how to put a variable in the scraper function so that i could return even or odd in tr's instead of building up my xpath... for the moment though, i'm content. thanks whoever posted that.

      Odds
      process '//*/table[@class="someclass"]//tr[position() mod 2 = 1]',
      Evens
      process '//*/table[@class="someclass"]//tr[position() mod 2 = 0]',

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://876432]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2014-07-12 22:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (241 votes), past polls