Skip to content

Instantly share code, notes, and snippets.

@PierrickKoch
Last active September 4, 2017 18:36
Show Gist options
  • Select an option

  • Save PierrickKoch/8ccc7df88b30fae1178497316a646120 to your computer and use it in GitHub Desktop.

Select an option

Save PierrickKoch/8ccc7df88b30fae1178497316a646120 to your computer and use it in GitHub Desktop.
document.location.href = 'http://www.meteofrance.com/previsions-meteo-france/toulouse/31000';
// TODO document.onload ?
document.body.innerHTML = document.querySelector("#mf-accordion-content-pluie > div > div.content").outerHTML;
document.querySelector("td").style.height = "30px";
from lxml.html import parse, tostring
html = parse('http://www.meteofrance.com/previsions-meteo-france/toulouse/31000')
elts = html.xpath('//div[@class="rain-chart"]')
text = tostring(elts[0])
print(text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment