Tuesday, July 15, 2014

iframe Part of a Webpage

PROBLEM
Scrape a part of a webpage onto another.

SOLUTION
iframe + disable scroll + adjust margins + set width/height

<iframe src="http://www.worldometers.info/world-population/" scrolling="no" style="height: 280px; width: 619px; margin-top: -220px; margin-left: -230px; border: 0px none;"></iframe>

Scraped Example of World Population Website

This will work as long as the webpage doesn't re-arrange content.  Debated between an iframe or jquery to scrape a certain element.  Accessing with jquery ended in permission error:
REFERENCES