0

I need to extract data used to build charts at Google Trends. I've heard that it gets possible by passing additional parameters in the url, but didn't find which ones.

Another idea was to look at the page source: http://www.google.com/trends/explore#q=data&date=5%2F2007%201m&cmpt=q. But it's so messy, that I could not figure out anything.

Are there any ideas how to parse pages like that?

Please, help.

4

1 回答 1

1

This is normal Chrome Inspector detective work. Just keep clicking down the tree until you reach this element:

<path d="M0.5,31.29L26.1,25.62L51.7,19.95L77.3,29.4L102.9,84.21L128.5,
86.1L154.1,27.51L179.7,12.39L205.3,10.5L230.9,16.17L256.5,27.51L282.1,
86.1L307.7,86.1L333.3,23.73L358.9,14.28L384.5,16.17L410.1,19.95L435.7,
33.18L461.3,82.32L486.9,84.21L512.5,23.73L538.1,16.17L563.7,19.95L589.3,
21.84L614.9,35.07L640.5,89.88L666.1,89.88L691.7,52.08L717.3,
29.4L742.9,25.62L768.5,25.62" stroke="#1155cc" stroke-width="2" fill-opacity="1" fill="none"></path>

which actually draws the graph.

于 2013-01-17T01:36:50.367 回答