def check_omahaproxy(channel="stable"):
version = 0
status_url = "http://omahaproxy.appspot.com/all?os=linux&channel=" + channel
usock = urllib.urlopen(status_url)
status_dump = usock.read()
usock.close()
status_list = StringIO.StringIO(status_dump)
status_reader = list(csv.reader(status_list, delimiter=','))
linux_channels = [s for s in status_reader if "linux" in s]
linux_channel = [s for s in linux_channels if channel in s]
version = linux_channel[0][2]
if version == 0:
print 'I could not find the latest %s build. Bailing out.' % channel
sys.exit(1)
else:
print 'Latest Chromium Version on %s at %s is %s' % (channel, status_url, version)
return version
chromium-latest.py 文件源码
python
阅读 37
收藏 0
点赞 0
评论 0
评论列表
文章目录