Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

dream-alpha / enigma2-plugin-extensions-vpnmanager   deb

Repository URL to install this package:

Version: 1.2.1 

/ usr / lib / enigma2 / python / Plugins / Extensions / VpnManager / readFreeVpnBook.pyo

ó
³cc@s$ddlmZddlZddlZy,ddlmZmZmZddlZWn9e	k
rZ
ddlmZddlmZmZnXddl
mZddlZddlZddlmZmZy
ejZWnek
rîn
Xee_dZd	Zd
d
d„ƒYZd„ZdS(iÿÿÿÿ(t
BeautifulSoupN(turlopentURLErrort	HTTPError(R(RR(tZipFile(tconfigt
configfileshttps://www.vpnbook.com/freevpns
/data/FreeVpntVpnBookcBsWeZeZedZd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
RS(s	/pass.pngcCs3d|_tjjtƒs/tjdtƒndS(Nsmkdir %s(tNonetupdatetostpathtisdirtCONF_DIRECTORYtsystem(tself((sH/usr/lib/enigma2/python/Plugins/Extensions/VpnManager/readFreeVpnBook.pyt__init__!s	cCsxg}tjjtƒrtxYtjtƒD]E}d|kr(td|}|jddƒ}t|jdƒƒdkr—tj	dd|jdƒdƒnd}d|kr²d}nKd|krÇd}n6t
|d	ƒ%}d
|jƒkrñdnd}WdQXtj
jj|jddƒjddƒkrEt}	|r<dnd}
nt}	d
}
|j|||	|
fƒq(q(Wn|S(Ns.ovpnt/tt-is\d+tudpttcptrs	proto tcps.confii(R
RRR
tlistdirtreplacetlentsplittretsubtopentreadRt
vpnmanagertactivetvaluetTruetFalsetappend(Rtis_vpntdatatconftconf_destinationt
conf_titletconf_countryt
conf_protot	conf_filet
is_connecttpng((sH/usr/lib/enigma2/python/Plugins/Extensions/VpnManager/readFreeVpnBook.pytget_config_data&s(C		$-#cCsº|jdƒr*t|jdƒjƒƒnd}|jddtƒrtdt|jddtƒdƒjddƒnd}|j|ƒ|jƒtjj	_
tjj	jƒtjƒdS(NtstrongRtimgtsrcshttps://www.vpnbook.com/t s%20(
tfindtgetTxttget_textR"Rtdownload_pw_imagetstripRRtusernameR!tsaveR(Rtsouptusertpw_image_url((sH/usr/lib/enigma2/python/Plugins/Extensions/VpnManager/readFreeVpnBook.pytset_access_data>s0J
cCsôg}|jtƒ}|rÀ|jdddƒ}t|ƒdkrÀtjdtƒtjdtƒ|j|dƒxE|djdd	tƒD]'}d
t	|d	ƒ}|j
|ƒqWqÀn|rðx|D]}|j|ƒqÍWt|_ndS(Ntultclass_tdiscisrm -R %ssmkdir %sitathrefshttps://www.vpnbook.com(
tget_url_souptURLtfind_allRR
RR
R>R"R5R$t
download_confR	(RR&R;tsectiontzip_urlturlR4((sH/usr/lib/enigma2/python/Plugins/Extensions/VpnManager/readFreeVpnBook.pytget_free_vpnFs 
cCs‡y1t|ddƒ}|jƒ}t|dƒ}WnKtk
rY}d|j|fGHdStk
r~}d|j|fGHdSX|SdS(Nttimeoutishtml.parsersHTTP Error: %s %ssURL Error: %s %s(RRRRtcodeRRtreason(RRJR&tcontentR;te((sH/usr/lib/enigma2/python/Plugins/Extensions/VpnManager/readFreeVpnBook.pyRDXscCs›yKt|ddƒ}td}t|dƒ}|j|jƒƒWdQXWnItk
rr}d|j|fGHn%tk
r–}d|j|fGHnXdS(NRLis	/pass.pngtwbsHTTP Error: %s %ssURL Error: %s %s(	RR
RtwriteRRRMRRN(RRJtftdestinationt
local_fileRP((sH/usr/lib/enigma2/python/Plugins/Extensions/VpnManager/readFreeVpnBook.pyR7gs
cCsâyWt|ddƒ}dtjj|ƒ}t|dƒ}|j|jƒƒWdQXWnItk
r~}d|j|fGHn`t	k
r¢}d|j
|fGHn<Xtjj|ƒrÞt|dƒ}|j
tƒ|jƒndS(NRLis/tmp/RQsHTTP Error: %s %ssURL Error: %s %sR(RR
RtbasenameRRRRRRMRRNtisfileRt
extractallR
tclose(RRJRSRTRURPtzf((sH/usr/lib/enigma2/python/Plugins/Extensions/VpnManager/readFreeVpnBook.pyRGts
(t__name__t
__module__R
tPW_PNGRR/R>RKRDR7RG(((sH/usr/lib/enigma2/python/Plugins/Extensions/VpnManager/readFreeVpnBook.pyRs
						
cCsRtjdkrt|ƒSy|jdƒ}Wntk
rM}t|ƒ}nX|S(Niisutf-8(ii(tsystversion_infotstrtencodet	Exception(R!terror((sH/usr/lib/enigma2/python/Plugins/Extensions/VpnManager/readFreeVpnBook.pyR5‡s
((tbs4RtsslR
turllib2RRRt	cookielibtImportErrorRcturllib.requestturllib.errortzipfileRRR^tComponents.configRRt_create_unverified_contextt _create_unverified_https_contexttAttributeErrort_create_default_https_contextRER
RR5(((sH/usr/lib/enigma2/python/Plugins/Extensions/VpnManager/readFreeVpnBook.pyt<module>s*

	j