How to rotate various user agents using selenium python on each request

后端 未结 3 2049
难免孤独
难免孤独 2020-12-06 23:24

I want to make 10 requests to https://www.google.com/ but with random user agents using selenium and python. I\'ve a loop and inside that loop I\'m making 10 requests with r

3条回答
  •  渐次进展
    2020-12-07 00:03

    it open 10 chrome instance because you did notclose() it, try

    ...
    ...
    driver1.get('https://www.whatsmyua.info/')
    time.sleep(5)
    driver1.close()
    

提交回复
热议问题