站长资源脚本专栏
python 自动批量打开网页的示例
简介如下所示:import webbrowserimport codecsimport timewith open("test.txt") as fp:for ebayno in fp:url = 'http://ebay.com/itm/'+ebayno.strip()time.sleep(1)
如下所示:
import webbrowser import codecs import time with open("test.txt") as fp: for ebayno in fp: url = 'http://ebay.com/itm/'+ebayno.strip() time.sleep(1) #打开间隔时间 webbrowser.open(url) #打开网页
以上这篇python 自动批量打开网页的示例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。