· 6 years ago · Dec 15, 2019, 09:42 PM
1import cfscrape
2from bs4 import BeautifulSoup
3import itertools
4import csv
5import random
6import time
7from termcolor import colored
8import requests
9from python_anticaptcha import AnticaptchaClient, NoCaptchaTaskProxylessTask, ImageToTextTask
10
11# This script is only to create account at footdistrict
12# LINK TO WEBSITE: https://footdistrict.com/en/customer/account/create/
13
14
15# LINKS
16
17tokenurl = 'https://nakedcph.typeform.com/app/form/result/token/lkHuwm/default'
18rafflepost = 'https://nakedcph.typeform.com/app/form/submit/lkHuwm'
19
20
21
22for i in range(100):
23 while True:
24 try:
25
26 proxy1 = 'gate.smartproxy.com:' + str(random.randint(10001, 49999))
27 proxy = {'http': 'http://' + proxy1, 'https': 'https://' + proxy1}
28 s = requests.Session()
29
30 randomusername = str(random.randint(10000000, 99999999999))
31
32 headers = {
33 'accept-encoding': 'gzip, deflate, br',
34 'accept-language': 'en-US,en;q=0.9',
35 'cache-control': 'no-cache',
36 'content-type': 'application/json; charset=UTF-8',
37 'origin': 'https://nakedcph.typeform.com',
38 'referer': 'https://nakedcph.typeform.com/to/lkHuwm',
39 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36'
40 }
41 scraper = cfscrape.create_scraper()
42
43 # RAFFLE
44 token = scraper.post(tokenurl, headers=headers, proxies=proxy)
45
46 landate = int(time.time())
47 time.sleep(4)
48
49
50 payload = {
51 "signature": token.text,
52 "form_id": "lkHuwm",
53 "landed_at": landate,
54 "answers": [
55 {
56 "field": {
57 "id": "NifA2cTSHO8v",
58 "type": "short_text"
59 },
60 "type": "text",
61 "text": "YC3P"
62 },
63 {
64 "field": {
65 "id": "kYPSQeJnGWMC",
66 "type": "short_text"
67 },
68 "type": "text",
69 "text": "Stan"
70 },
71 {
72 "field": {
73 "id": "KsBuo7BLVtSN",
74 "type": "short_text"
75 },
76 "type": "text",
77 "text": "Smith"
78 },
79 {
80 "field": {
81 "id": "f1de0gnTiSD1",
82 "type": "short_text"
83 },
84 "type": "text",
85 "text": "CVBRR"
86 },
87 {
88 "field": {
89 "id": "Yw6qnHziQV77",
90 "type": "email"
91 },
92 "type": "email",
93 "email": randomusername + "@gmail.com"
94 },
95 {
96 "field": {
97 "id": "pvqQWGpUCHJk",
98 "type": "short_text"
99 },
100 "type": "text",
101 "text": "10001"
102 },
103 {
104 "field": {
105 "id": "K4xDV3wuo81l",
106 "type": "dropdown"
107 },
108 "type": "text",
109 "text": "Poland"
110 },
111 {
112 "field": {
113 "id": "tz8BuHvgTo73",
114 "type": "dropdown"
115 },
116 "type": "text",
117 "text": "No"
118 }
119 ]
120 }
121 resp = scraper.post(rafflepost, json=payload, headers=headers, proxies=proxy)
122 print(payload)
123 print(resp.text)
124 if 'success' in resp.text:
125 print(colored('Taken part in a raffle: ' + randomusername, 'green'))
126
127 else:
128 print(colored('Not taken part in raffle!', 'red'))
129 continue
130
131 except:
132 print(colored('Error 2', 'red'))
133 continue
134 break