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
import json | |
import requests | |
url = "http://compras.dados.gov.br/fornecedores/v1/fornecedores.json" | |
querystring = {"uf":"AL"} | |
response = requests.request("GET", url, params=querystring) | |
jsonresponse = json.loads(response.content) | |
for field in jsonresponse['_embedded']['fornecedores']: |
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
import requests | |
from bs4 import BeautifulSoup as bs | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
# Desabilitando Warnings | |
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) | |
url = 'http://comprasnet.gov.br/ConsultaLicitacoes/ConsLicitacao_Relacao.asp?numprp=&dt_publ_ini=11/05/2018&dt_publ_fim=11/05/2018&chkModalidade=5&chk_concor=&chk_pregao=1,2,3,4&chk_rdc=&optTpPesqMat=M&optTpPesqServ=S&chkTodos=&chk_concorTodos=&chk_pregaoTodos=-1&txtlstUf=&txtlstMunicipio=&txtlstUasg=&txtlstGrpMaterial=&txtlstClasMaterial=&txtlstMaterial=&txtlstGrpServico=&txtlstServico=&txtObjeto=' | |
# Acessando a URL sem verificar autenticidade do certificado SSL |
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
virtualenv --python=python3 gdg | |
source gdg/bin/activate | |
pip install scrapy | |
scrapy startproject gdg | |
cd gdg |
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
#!/bin/env python | |
import os | |
import json | |
import hashlib | |
from functools import reduce | |
import argparse | |
import logging | |
import shutil | |
DOCKER_DIR = '/var/lib/docker' |