@@ -11,16 +11,16 @@ async function guess(){
11
11
12
12
//Init Pyodide
13
13
let pyodide = await loadPyodide ( ) ;
14
- await pyodide . loadPackage ( [ "certifi-2024.2.2-py3-none-any.whl" , "charset_normalizer-3.3.2-py3-none-any.whl" , "construct-2.8.8-py2.py3-none-any.whl" , "idna-3.6-py3-none-any.whl" , "packaging-23.2-py3-none-any.whl" , "protobuf-4.24.4-cp312-cp312-emscripten_3_1_52_wasm32.whl" , "pycryptodome-3.20.0-cp35-abi3-emscripten_3_1_52_wasm32.whl" , "pymp4-1.4.0-py3-none-any.whl" , "pyodide_http-0.2.1-py3-none-any.whl" , "pywidevine-1.8.0-py3-none-any.whl" , "requests-2.31.0-py3-none-any.whl" , "urllib3-2.2.1-py3-none-any.whl" ] . map ( e => "libs/wheels/" + e ) )
14
+ await pyodide . loadPackage ( [ "certifi-2024.2.2-py3-none-any.whl" , "charset_normalizer-3.3.2-py3-none-any.whl" , "construct-2.8.8-py2.py3-none-any.whl" , "idna-3.6-py3-none-any.whl" , "packaging-23.2-py3-none-any.whl" , "protobuf-4.24.4-cp312-cp312-emscripten_3_1_52_wasm32.whl" , "pycryptodome-3.20.0-cp35-abi3-emscripten_3_1_52_wasm32.whl" , "pymp4-1.4.0-py3-none-any.whl" , "pyodide_http-0.2.1-py3-none-any.whl" , "pywidevine-1.8.0-py3-none-any.whl" , "requests-2.31.0-py3-none-any.whl" , "urllib3-2.2.1-py3-none-any.whl" ] . map ( e => "/ libs/wheels/" + e ) )
15
15
16
16
//Configure Guesser
17
17
pyodide . globals . set ( "pssh" , document . getElementById ( 'pssh' ) . value ) ;
18
18
pyodide . globals . set ( "licUrl" , requests [ userInputs [ 'license' ] ] [ 'url' ] ) ;
19
19
pyodide . globals . set ( "licHeaders" , requests [ userInputs [ 'license' ] ] [ 'headers' ] ) ;
20
20
pyodide . globals . set ( "licBody" , requests [ userInputs [ 'license' ] ] [ 'body' ] ) ;
21
- let pre = await fetch ( 'python/pre.py' ) . then ( res => res . text ( ) )
22
- let after = await fetch ( 'python/after.py' ) . then ( res => res . text ( ) )
23
- let scheme = await fetch ( `python/schemes/${ document . getElementById ( "scheme" ) . value } .py` ) . then ( res => res . text ( ) )
21
+ let pre = await fetch ( '/ python/pre.py' ) . then ( res => res . text ( ) )
22
+ let after = await fetch ( '/ python/after.py' ) . then ( res => res . text ( ) )
23
+ let scheme = await fetch ( `/ python/schemes/${ document . getElementById ( "scheme" ) . value } .py` ) . then ( res => res . text ( ) )
24
24
25
25
//Get result
26
26
let result = await pyodide . runPythonAsync ( [ pre , scheme , after ] . join ( "\n" ) ) ;
@@ -52,7 +52,7 @@ window.corsFetch = (u, m, h, b) => {
52
52
}
53
53
54
54
async function autoSelect ( ) {
55
- let selectRules = await fetch ( "selectRules.conf" ) . then ( ( r ) => r . text ( ) ) ;
55
+ let selectRules = await fetch ( "/ selectRules.conf" ) . then ( ( r ) => r . text ( ) ) ;
56
56
//Remove blank lines, comment-outs, and trailing spaces at the end of lines
57
57
selectRules = selectRules . replace ( / \n ^ \s * $ | \s * \/ \/ .* | \s * $ / gm, "" ) ;
58
58
selectRules = selectRules . split ( "\n" ) . map ( row => row . split ( "$$" ) ) ;
0 commit comments