Created
May 29, 2019 19:08
-
-
Save jimywork/94c1e8c3b46ba0394f3d903dff12b9ee to your computer and use it in GitHub Desktop.
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
import urllib3 | |
from io import BytesIO | |
from bs4 import BeautifulSoup | |
conn = urllib3.PoolManager() | |
docx = conn.request( 'GET', 'http://procon.rs.gov.br/upload/arquivos/201801/03151705-procon-sao-gabriel-ranking-de-2017.docx').data | |
document = ZipFile(BytesIO(docx)).read('word/document.xml').decode('utf-8') | |
print(document) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment