in reply to Re: searching with mojo dom
in thread searching with mojo dom

the HTML i'm working with can be found here: https://weather.com/weather/today/l/20001:4:US

the full/unedited selector is:

#APP > div > div.today.section-local-suite.page > div.section-page-nam +e > div.hero.hero-background.layout-centered > div.hero-flex.styles-d +2KKDEYo__heroFlex__3UOm0 > div.region.region-hero-left > div > sectio +n > div.today_nowcard-sidecar.component.panel > table > tbody > tr:nt +h-child(1) > td > span
(the wind speed text)

Replies are listed 'Best First'.
Re^3: searching with mojo dom
by adambot (Acolyte) on Mar 11, 2018 at 20:42 UTC
    I'm thinking if i could figure out how to do a div find that would be easiest -- i have my @headers = $dom->find('div ~ today_nowcard-sidecar')->map('text')->each; but it doesn't seem to find anything...

      working more on this, Here is the search code that works:

      @data = $dom->find('div.today_nowcard-sidecar')->each;

      Now i'm left trying to dig through all the data -- when i go through the array i find that the info i need is represented in the dom identified by ${$VAR1}->{'tree'}->[4]->[5]->[4]->[5]->[4] (data gotten using Data::Dumper on @data). Any pointers?