python - Scraping Data From Interactive Map -


i scrape voter registration data underlying map:

http://www.bostonglobe.com/metro/2012/08/28/registration-figures-show-massachusetts-voters-continue-abandon-two-major-political-parties/p0zw7snj9r07dk913p36km/igraphic.html?p1=article_graphic

as hover on each town, both total , by-party figures in box below change. record name of each town , registration counts party. suggestions how helpful. i've done scraping in past not interactive , first few attempts various python packages haven't worked.

(unfortunately, sources link @ bottom not useful because links secretary of state's main page , original report data no longer available)

no need build app scrape this, looked @ source of page 5 min, check out:

http://www.bostonglobe.com/r/boston/2011-2020/webgraphics/metro/bostonglobe.com/2012/08/voter/voter-regs.js

otherwise

you need have technology has javascript engine, phantomjs or firefox/chrome drivers.

if want stick python, selenium webdriver way go.

http://www.seleniumhq.org/projects/webdriver/


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -