forked from OutOfBoundsError/EbayView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ebayView.py
30 lines (25 loc) · 961 Bytes
/
ebayView.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import requests
from threading import Thread
import threading
import time
def view(prodUrl, index):
session = requests.Session()
headers = {
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36',
'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8'
}
session.get(prodUrl, headers=headers)
print("[SUCCESSFULLY VIEWED # " + str(index) + "]" )
def start(numView, productUrl):
isDone = False
while (isDone == False):
for i in range(numView):
t = Thread(target = view, args = (productUrl,i))
t.start()
time.sleep(0.1)
isDone=True
def loopStart(numTimes, productUrl):
for i in range(numTimes):
view(productUrl)
ebayLink = 'https://www.ebay.com/itm/#######' #Change this to your ebay item link
start(100, ebayLink)