Skip to content

Instantly share code, notes, and snippets.

@yarko
Created October 3, 2013 05:09
Show Gist options
  • Save yarko/6805268 to your computer and use it in GitHub Desktop.
Save yarko/6805268 to your computer and use it in GitHub Desktop.
grab a 1000 digit number from a web page
from lxml import html
node = html.parse('http://projecteuler.net/problem=8').getroot()
number_parts = node.cssselect('div.problem_content > p')[1].text_content().split()
print "".join(number_parts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment