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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -