Hi Alistair, On 15/02/18 12:50, Alistair Grant wrote:
Hi Offray,
On 14 February 2018 at 20:29, Offray Vladimir Luna Cárdenas <offray.luna@mutabit.com> wrote:
Yes. Me too. Alistair, any starting points with this example? I will take from there and we could get visibility in the upcoming Open Data Day. I'm not sure that I understand what you're after, but maybe the following will help.
This simply returns a collection of all the h4 headings that are in cells:
| rootNode divs cells cellTitleNodes cellTitles |
rootNode := GoogleChrome get: 'http://mutabit.com/grafoscopio/index.en.html'. divs := rootNode findAllTags: 'div'. cells := divs select: [ :each | (' ' split: (each attributeAt: 'class')) includes: 'mdl-cell' ]. cellTitleNodes := cells flatCollect: [ :each | each findAllTags: 'h4' ]. cellTitles := cellTitleNodes collect: [ :each | (each findAllStrings: true) first nodeValue ]. { rootNode. divs. cells. cellTitleNodes. cellTitles }
Thanks. This was the starting point I was looking for.
Of course, we're going to document everything and share back (I have already proposed some improvements in documentation via PR on the Git repo). Thanks very much for improving the readme. I've merged the PR.
No problem. Thanks to you for starting the project. Cheers, Offray