Last active
December 4, 2015 14:02
-
-
Save py3in/55bb4392c0009c3c65db to your computer and use it in GitHub Desktop.
frases_with_splinter
This file contains 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
#!/usr/bin/python | |
# -*- coding: UTF-8 -*- | |
import re | |
from time import sleep | |
url = "http://pensador.uol.com.br/frases_curtas/" | |
with Browser() as browser: | |
browser.visit(url) | |
browser.html | |
tree = html.fromstring(browser.html) | |
divs = browser.find_by_tag("div") | |
for div in divs: | |
print div.html.encode('utf8') | |
exit() |
Solved with endode utf8
for div in divs:
print div.html.encode('utf8')
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Error out-put