简单的phantomjs多线程

from selenium import webdriver
import threading


def crawl():
    gl = webdriver.PhantomJS()
    for url in url_list:
        print(url)
        gl.get(url)
    gl.quit()

if __name__=='__main__':
    url_list = ["https://mp.csdn.net"] * 10
    for i in range(2):
        threading.Thread(target=crawl).start()
阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页