python - Scraping a web page as you manually navigate -


is there way, using library or method, scrape webpage in real time user navigates manually? scrapers know of such python mechanize create browser object emulates browser - of course not looking since if have browser open, different 1 mechanize creates.

if there no solution, problem want scrape elements html5 game make intelligent agent of sorts. won't go more detail, suspect if others trying same in future (or real time scraping real user), solution useful them well.

thanks in advance!

depending on use-case is, set socks proxy or other form of proxy , configure log traffic, instruct browser use it. you'd scrape log somehow.

similarly, if have control on router, configure capture , logging there, e.g. using tcpdump. wouldn't decrypt encrypted traffic, of course.

if working 1 browser, there may way instruct @ each action via custom browser plugin, i'd have guess you'd running security model issues lot.

the problem html5 game typically of "navigation" done using lot of javascript. javascript typically doing lot -- manipulating dom, triggering requests new content fit dom, etc...

because of might better off looking os-level or browser-level scripting services can "drive" keyboard , mouse events, take screenshots, or possibly take snapshot of current page dom , query it.

you might investigate browser automation , testing frameworks selenium this.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -