Python DOS攻击页面上出现错误的Web爬虫程序

Python DOS攻击页面上出现错误的Web爬虫程序,python,selenium,selenium-webdriver,Python,Selenium,Selenium Webdriver,我想用Python编写一个网络爬虫。 我在DOS攻击屏幕上遇到了一个错误。 这是我的密码 from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from sele

我想用Python编写一个网络爬虫。 我在DOS攻击屏幕上遇到了一个错误。 这是我的密码

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select
from time import sleep

 
        
class bot():
    def __init__(self):
    
        #open chrome
        option = webdriver.ChromeOptions()#FireFex
        #for https certificate
        option.add_argument('--ignore-certificate-errors') 
        options = webdriver.ChromeOptions()
        
        options.add_experimental_option("excludeSwitches", ["enable-automation"])
        options.add_experimental_option('useAutomationExtension', False)
        options.add_argument("--disable-blink-features=AutomationControlled")
       # driver = webdriver.Chrome(options=options, executable_path=r"webdriver\chromedriver.exe")
        
        #path chrom driver 
        chromePath = 'chromedriver.exe'
        
        #open chrome and global variable
        self.driver = webdriver.Chrome(chromePath ,chrome_options=option)
    #for find element   xpath    
    def pageLod(self, xpath):
        timeOut = 20
        try:
            #load or errors
            element_present = EC.presence_of_element_located(By.CLASS_NAME, xpath)
            WebDriverWait(self.driver, timeOut).until(element_present)
            
            
        except TimeoutException:
            print('time out')
    
    def openVideo(self, url): 
        self.driver.get(url) 
        
       
        
b = bot()
b.openVideo('https://test.com/')        
        
        
        
    

我制作了一个discord机器人,它使用selenium访问网站并获取信息,当我在本地运行代码时,我没有任何问题,但当我部署到Heroku时,我得到的第一个URL会将我重定向到需要注意的页面云焰