· 7 years ago · Sep 14, 2018, 07:28 AM
1testing = Generator()
2threads = []
3for x in range(0,10):
4 t = Thread(target=testing.test())
5 threads.append(t)
6 t.start()
7for t in threads:
8 t.join()
9
10import requests
11import re
12from bs4 import BeautifulSoup as soup
13import random
14from threading import Thread
15from multiprocessing import Process
16
17itemlink = str(input("Please enter an item link: "))
18
19
20def random_line(fname):
21 lines = open(fname).read().splitlines()
22 print('fuck you')
23 return random.choice(lines)
24
25
26
27class Generator(Thread):
28 def __init__(self, itemlink):
29 Thread.__init__(self)
30 self.session = requests.Session()
31 #self.proxy = random_line("proxies.txt")
32 self.proxy = ''
33 self.firstname = ''
34 self.lastname = ''
35 self.email = ''
36 self.password = ''
37 self.itemlink = itemlink
38 self.partial_item_link = itemlink[20::]
39
40 def test(self):
41 self.proxy = random_line('proxies.txt')
42 self.firstname = random.choice(["Jackson", "Aiden", "Sophia", "Emma", "Olivia", "Lucas", "Ava", "Liam", "Mia", "Noah", "Ethan", "Isabella", "Riley", "Caden", "Aria", "Mason", "Elijah", "Zoe", "Lily", "Michael", "Benjamin", "Emily", "James", "Chloe", "Abigail", "Avery", "Evelyn", "Daniel", "Jack", "Madison", "Caleb", "Alexander", "Daniel", "Jack", "Evelyn", "Isaac", "Cameron", "Julian", "Eli", "Peyton", "Mackenzie", "Maria", "Camilla", "John", "Lincoln", "Brayden", "Victoria"])
43 self.lastname = random.choice(["Smith", "Johnson", "Williams", "Jones", "Brown", "Davis", "Miller", "Wilson", "Moore", "Taylor", "Anderson", "Thomas", "Jackson", "White", "Harris", "Martin", "Thompson", "Garcia", "Martinez", "Lewis", "Hall", "Allen", "Young", "Hernandez", "King", "Wright", "Lopez", "Hill", "Scott", "Green", "Adams", "Baker", "Gonzales", "Nelson", "Carter", "Mitchell", "Perez", "Roberts", "Turner", "Phillips", "Campbell", "Parker", "Evans", "Stewart", "Sanchez", "Morris"])
44 self.email = self.firstname + self.lastname + str(random.randint(00000,10000)) + '@gmail.com'
45 self.password = 'k0rnsyrupWatchBot'
46 #item_link = input("Please enter an item link")
47 #print(self.proxy)
48 # print(self.firstname)
49 # print(self.lastname)
50 #print('generating ebay account with ' + self.email)
51 #print(self.password)
52
53 self.proxy = {
54 "http": self.proxy,
55 "https": self.proxy
56 }
57
58 print('starting thread with {}'.format(self.email))
59
60 #print(self.proxy)
61
62 headers = {
63 #headers that i'm passing
64 }
65
66 data = {
67
68 #data that i'm passing
69 }
70 try:
71 self.session.post('url', headers=headers, data=data, proxies=self.proxy)
72 print('blah account with {} generated'.format(self.email))
73 except:
74 return
75
76
77 # print(r.text)
78
79 headers3 = {
80 #more headers
81
82 }
83
84
85 s = self.session.get(self.itemlink, headers=headers3, proxies=self.proxy)
86 page_soup = soup(s.text, 'html.parser')
87 # print(page_soup)
88
89 watch_link = page_soup.find('a', {'class': ' '})
90 # print(watch_link)
91 watch_link = watch_link['href']
92 # print(watch_link)
93
94
95 t = self.session.get(watch_link, headers=headers3, proxies=self.proxy)
96 # s = sess.get(item_link, headers=headers3, proxies=proxy)
97 # print(s.content)
98
99 # print(t.text)
100 if "ADDEDTO_ONE_LIST_MULTIPLE_OTHER" in t.text:
101 print('item added to watch list')
102 else:
103 print('item not added to watch list')
104 return
105
106 return
107
108 def view_bot(self):
109 headers3 = {
110 #more headers
111
112 }
113
114 self.session.get(self.itemlink, headers=headers3, proxies=self.proxy)
115
116
117testing = Generator(itemlink)
118threads = []
119 for x in range(0,10):
120 t = Thread(target=testing.test())
121 threads.append(t)
122 t.start()
123 for t in threads:
124 t.join()