Javascript generated content?

43 views
Skip to first unread message

Jon Hjerting

unread,
Nov 30, 2015, 3:35:02 PM11/30/15
to phantomjs
I am trying to scrape this site, https://www.norsk-tipping.no/lotteri/lotto#/resultater
I can get hold of the winning numbers on the page.
In order to get to results from the previous week one has to click on the "<" symbol.
But I can´t seem to find this in the html, so I am not sure how to access it using phantomjs.
Is there anyone who could give me a hint?
If I use Inspect element in developer tools, there seems to be a java function, but when I view source I can't find it.

Damian Borowski

unread,
Dec 30, 2015, 4:30:06 AM12/30/15
to phantomjs
Hi there,

I found this element in developer tools:

<button title="Vis forrige trekning" type="button" ng-disabled="drawPicker.selectedDrawIndex === drawPicker.drawList.length - 1" ng-click="drawPicker.previousDraw()" aria-disabled="false">
                    <span class="icon icon-chevron-left"></span>
                </button>

Then in the console, when I do:

$($0).trigger('click')

It changes the page. So I think this is your way to go.

Regards,

Damian.
Reply all
Reply to author
Forward
0 new messages