我在GCP上定义了一个云函数,用于抓取,这是一个用Python编写的网站。
首先,我定义了一个函数,它简单地打开了webdriver:
from selenium import webdriver
def launch_search(request):
# Starting a webdriver
driver = webdriver.Chrome()
return 'Success'
这个函数不能工作(当我触发它时是Error: could not handle the request),可能是因为我的远程计算机上没有安装Chrome驱动程序。因此: