Cannot scrape with beautifulsoup and urllib because of javascript variable -


unfortunately newbie beautifulsoup , urllib might not ask correctly need.. there website www.example.com need extract data website displays random message.

the problem message displayed after user presses button, otherwise shows general message "press button see message".

after searching stackoverflow realised there no way change variables calling browser url this.. www.example.com/?showrandommsg='true'

in threads read maybe can bookmarlets..

is there anyway use bookmarklets beautifulsoup or urllib in order access website , make display random message?

thanks in advance! :d

i came after long time answer own question..

i found many solutions , tutorials on web , of them suggesting using selenium , xpath method more complex needed..

so ended using selenium emulating browser (firefox in case) , grabbing html after page loaded completely.

after still using beautifoulsoup parse html code (whihc include javascript data too).


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -