Posts by WagnerAlbJr • 81 points
5 posts
-
1
votes3
answers1839
viewsA: Web scraping python running javascript on the CEF website
The box site itself makes available the download of all results in html format. On this page below it is possible to download http://loterias.caixa.gov.br/wps/portal/loterias/landing/megasena , but…
-
1
votes1
answer407
viewsA: Specific chunk break in JSON file with python
In the string result use result = result.split('Circ_')[1], this will eliminate the beginning, after result = result.split('_')[0] , This will take the number. In the first part you use "Circ_" as a…
-
1
votes1
answer410
viewsA: Sort TXT lines in numerical order
If it fits in memory it is very simple. You read all the lines of the file, and then go over them in reverse order. arquivo = open("nomearquivo.txt", "r") conteudo = arquivo.readlines()…
-
0
votes2
answers885
viewsA: Typeerror: a bytes-like Object is required, not 'str'
From python2 to python3 strings change the representation of a bit array to the Unicode array. Your code probably wants a bit array, not a Unicode array, which is the standard string format in…
pythonanswered WagnerAlbJr 81 -
2
votes2
answers241
viewsA: Automation of tasks in linux
If you start to automate databases you will notice that bash will soon limit you, python has fantastic libraries like sqlalchemy and native connectors for virtually all databases, both relational…