|
@@ -12,7 +12,7 @@ from celery.schedules import crontab
|
|
|
import celery
|
|
|
from celery.signals import celeryd_init
|
|
|
from celery import signals
|
|
|
-
|
|
|
+import random
|
|
|
from click import Option
|
|
|
from selenium import webdriver
|
|
|
import time
|
|
@@ -75,13 +75,20 @@ def selenium_jared_click():
|
|
|
options.add_argument("--headless")
|
|
|
options.add_argument("--incognito")
|
|
|
#options.add_argument('--blink-settings=imagesEnabled=false')
|
|
|
-# PROXY = "172.105.205.52:8118" # IP:PORT or HOST:PORT
|
|
|
-# PROXY = "139.144.120.184:8118" # IP:PORT or HOST:PORT
|
|
|
-# PROXY = "172.104.92.245:8118" # IP:PORT or HOST:PORT
|
|
|
- PROXY = "172.104.67.159:8118" # IP:PORT or HOST:PORT
|
|
|
-
|
|
|
-
|
|
|
- options.add_argument('--proxy-server=http://%s' % PROXY)
|
|
|
+ r=random.randint(0,4)
|
|
|
+ if r==0:
|
|
|
+ PROXY = "172.105.205.52:8118" # IP:PORT or HOST:PORT
|
|
|
+ elif r==1:
|
|
|
+ PROXY = "139.144.120.184:8118" # IP:PORT or HOST:PORT
|
|
|
+ elif r==2:
|
|
|
+ PROXY = "172.104.92.245:8118" # IP:PORT or HOST:PORT
|
|
|
+ elif r==3:
|
|
|
+ PROXY = "172.104.67.159:8118" # IP:PORT or HOST:PORT
|
|
|
+ else:
|
|
|
+ PROXY=None
|
|
|
+
|
|
|
+ if PROXY is not None:
|
|
|
+ options.add_argument('--proxy-server=http://%s' % PROXY)
|
|
|
|
|
|
|
|
|
mobile_emulation = {
|