Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
48 lines (35 sloc) 1.49 KB
# Opera Browser file
# Licensed under the Apache License, Version 2.0
meta title="Opera Browser"
meta namespace="opera"
meta name="opera"
using wget,python:3.4.1
cmd pip install requests --quiet
cmd mkdir c:\Workspace
workdir c:\Workspace
echo import sys >
echo import requests >>
echo import re >>
echo host = "^&list=all" >>
echo headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0'} >>
echo r = requests.get(host , headers=headers, timeout=10) >>
echo print(re.findall('\d+\.\d+\.\d+\.\d+', r.text)[0]) >>
cmd python
var version = last
var url = ""+ version + "/win/Opera_" + version + "_Setup.exe"
cmd "python -c ""print('%version%'.split('.')[0])"""
var tag = last
cmd "wget --no-check-certificate --no-verbose %url%"
cmd "Opera_%version%_Setup.exe --silent --setdefaultbrowser=1 --import-browser-data=0 --enable-stats=0 --launchopera=0 --installfolder=c:\Opera\"
cmd del "c:\Opera\%version%\opera_autoupdate.exe"
workdir c:\
cmd rmdir c:\Workspace /s /q
cmd rmdir c:\wget /s /q
cmd rmdir c:\Python34 /s /q
meta tag=tag
startup file ("c:\Opera\launcher.exe")