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
| valor = float(input('Valor das compras: ')) | |
| print('FORMAS DE PAGAMENTO') | |
| print('[ 1 ] à vista em dinheiro/pix (10% de desconto)') | |
| print('[ 2 ] à vista no cartão (5% de desconto)') | |
| print('[ 3 ] 2x no cartão (5% de acréscimo)') | |
| print('[ 4 ] 3x até 10x no cartão (10% de acréscimo)') | |
| opcao = int(input('Qual a forma de pagamento? ')) |
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
| class TjalSpider(scrapy.Spider): | |
| name = 'tjal' | |
| allowed_domains = ['www2.tjal.jus.br'] | |
| start_urls = ['https://www2.tjal.jus.br/cpopg/open.do'] | |
| def start_requests(self): | |
| yield scrapy.FormRequest( | |
| method='GET', | |
| url='https://www2.tjal.jus.br/cpopg/open.do', | |
| formdata={ |
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
| Exception in thread Thread-9: | |
| Traceback (most recent call last): | |
| File "site-packages/urllib3/connectionpool.py", line 677, in urlopen | |
| File "site-packages/urllib3/connectionpool.py", line 426, in _make_request | |
| File "<string>", line 3, in raise_from | |
| File "site-packages/urllib3/connectionpool.py", line 421, in _make_request | |
| File "http/client.py", line 1344, in getresponse | |
| File "http/client.py", line 306, in begin | |
| File "http/client.py", line 267, in _read_status | |
| File "socket.py", line 589, in readinto |