Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
frases_with_splinter
#!/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()
@py3in

This comment has been minimized.

Copy link
Owner Author

py3in commented Dec 4, 2015

Error out-put
t

@py3in

This comment has been minimized.

Copy link
Owner Author

py3in commented Dec 4, 2015

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
You can’t perform that action at this time.