Created
June 22, 2014 18:49
-
-
Save wiiaboo/e2f81aa5b0967f2146e9 to your computer and use it in GitHub Desktop.
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
#fake kuantokusta app | |
# start session | |
s = Session() | |
s.headers.update({'Host': 'apps.kuantokusta.pt', 'Connection': 'Keep-Alive', 'User-Agent': 'Mozilla/5.0 (Linux; U; Android 4.4.2; en-GB; Moto G Build/KVT49L; motorola) pt.kuantokusta/1.3.2', 'Cookie2': '$Version=1'}) | |
r = s.post('http://apps.kuantokusta.pt/Aplicacoes/android.php?from=mobile-android-kuantokusta') | |
# buscar lista de categorias | |
payload = {'ac': '1', 'area': '1'} | |
r = s.post('http://apps.kuantokusta.pt/Aplicacoes/android.php?from=mobile-android-kuantokusta', data=payload) | |
# id=4 nome=Componentes | |
# id=42 nome=Armazenamento Interno | |
# id=40 nome=Placas Vídeo | |
# id=41 nome=Caixas | |
# id=43 nome=Arrefecimento | |
# buscar lista de filhos de categoria | |
payload = {'ac': '1', 'area': '1', 'id': '40'} | |
r = s.post('http://apps.kuantokusta.pt/Aplicacoes/android.php?from=mobile-android-kuantokusta', data=payload) | |
# categoria=143 nome=Placas Gráficas | |
# buscar lista de items de filho de categoria | |
payload = {'ac': '3', 'area': '1', 'categoria': '143', 'pagina': '1', 'ord': '2'} | |
r = s.post('http://apps.kuantokusta.pt/Aplicacoes/android.php?from=mobile-android-kuantokusta', data=payload) | |
# search for R7 265 | |
payload = {'ac': '4', 'pagina': '1', 'ord': '2', 'name': 'R7 265'} ### ord 2 = mais barato para mais caro | |
r = s.post('http://apps.kuantokusta.pt/Aplicacoes/android.php?from=mobile-android-kuantokusta', data=payload) | |
# buscar produto 349928 | |
payload = {'ac': '5', 'area': '1', 'ord': '2', 'id': '349928'} | |
r = s.post('http://apps.kuantokusta.pt/Aplicacoes/android.php?from=mobile-android-kuantokusta', data=payload) | |
r.json()['data']['produtos'][0]['preco_min'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment