Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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.

Replies are listed 'Best First'.
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?
[Cosmic37]: and monkeys too...
[Cosmic37]: is anyone doing machine learning with Perl?
[Cosmic37]: I was using gneural code in C and it was interesting but did not have back propagation for neural networks
[corenth]: Cosmic, poking at it, but not really.
[Cosmic37]: I read that its possible to use the FANN library with Perl so I might try that now...
[corenth]: i have a question. I used map{ blah();blah(); blah();}@stuff; and it used up a ton of memory vs. the for(@stuff){} equivalent. What gives? (if anyone knows)
[Cosmic37]: FANN also has LGPL license which I like and its supposed to be quite a capable library from what I read
[corenth]: Cosmic, that sounds interesting. What is FANN (I could search it if I weren't so lazy about it)?
[Cosmic37]: how big was @stuff corenth?

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2018-02-20 18:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (274 votes). Check out past polls.

    Notices?