Created
October 3, 2013 05:09
-
-
Save yarko/6805268 to your computer and use it in GitHub Desktop.
grab a 1000 digit number from a web page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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