mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-13 06:34:44 -04:00
Revert pycurl and add Accept-Encoding to build script
This commit is contained in:
parent
d5efd04b77
commit
8e49371c84
4 changed files with 14 additions and 18 deletions
5
.github/workflows/macos.yml
vendored
5
.github/workflows/macos.yml
vendored
|
@ -17,10 +17,7 @@ jobs:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
brew uninstall --ignore-dependencies curl
|
brew install create-dmg dylibbundler gtk+3
|
||||||
brew uninstall --ignore-dependencies openssl
|
|
||||||
brew install create-dmg dylibbundler gtk+3 openssl curl
|
|
||||||
python3 -m pip install --compile --ignore-installed pycurl
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
python3 grabTitles.py
|
python3 grabTitles.py
|
||||||
|
|
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
||||||
msystem: UCRT64
|
msystem: UCRT64
|
||||||
release: true
|
release: true
|
||||||
update: true
|
update: true
|
||||||
install: zip git mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-python mingw-w64-ucrt-x86_64-python-pycurl mingw-w64-ucrt-x86_64-gtk3 mingw-w64-ucrt-x86_64-pkg-config mingw-w64-ucrt-x86_64-go mingw-w64-ucrt-x86_64-ntldd-git
|
install: zip git mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-python mingw-w64-ucrt-x86_64-gtk3 mingw-w64-ucrt-x86_64-pkg-config mingw-w64-ucrt-x86_64-go mingw-w64-ucrt-x86_64-ntldd-git
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
python3 grabTitles.py
|
python3 grabTitles.py
|
||||||
|
|
|
@ -13,7 +13,7 @@ RUN mkdir -p /usr/share/man/man1 /usr/share/man/man2 && \
|
||||||
|
|
||||||
RUN apt-fast -y --no-install-recommends update && \
|
RUN apt-fast -y --no-install-recommends update && \
|
||||||
apt-fast -y --no-install-recommends upgrade && \
|
apt-fast -y --no-install-recommends upgrade && \
|
||||||
apt-fast install -y --no-install-recommends build-essential libgcrypt20-dev libgtk-3-dev libfuse2 libtool librsvg2-dev python3-pycurl && \
|
apt-fast install -y --no-install-recommends build-essential libgcrypt20-dev libgtk-3-dev libfuse2 libtool librsvg2-dev && \
|
||||||
wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz && \
|
wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz && \
|
||||||
tar -C /usr/local -xzf go*.linux-amd64.tar.gz && \
|
tar -C /usr/local -xzf go*.linux-amd64.tar.gz && \
|
||||||
chmod +x /usr/local/go/bin/go* && \
|
chmod +x /usr/local/go/bin/go* && \
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/env python
|
#!/bin/env python
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pycurl
|
import urllib.request
|
||||||
|
import ssl
|
||||||
|
|
||||||
# Don't edit below this line
|
# Don't edit below this line
|
||||||
|
|
||||||
|
@ -10,16 +11,14 @@ def checkAndDeleteFile(file):
|
||||||
print(f"Deleting {file}")
|
print(f"Deleting {file}")
|
||||||
os.remove(file)
|
os.remove(file)
|
||||||
|
|
||||||
def cDownload(url, file):
|
# Disable certificate verification
|
||||||
with open(file, 'wb') as f:
|
ssl_context = ssl.create_default_context()
|
||||||
c = pycurl.Curl()
|
ssl_context.check_hostname = False
|
||||||
c.setopt(c.URL, url)
|
ssl_context.verify_mode = ssl.CERT_NONE
|
||||||
c.setopt(c.WRITEDATA, f)
|
|
||||||
c.setopt(c.FOLLOWLOCATION, True)
|
opener = urllib.request.build_opener(urllib.request.HTTPSHandler(context=ssl_context))
|
||||||
c.setopt(c.USERAGENT, "NUSspliBuilder/2.2")
|
opener.addheaders = [("User-agent", "NUSspliBuilder/2.2"), ("Accept-Encoding", "gzip, deflate, br")]
|
||||||
c.setopt(c.ACCEPT_ENCODING, "")
|
urllib.request.install_opener(opener)
|
||||||
c.perform()
|
|
||||||
c.close()
|
|
||||||
|
|
||||||
checkAndDeleteFile("db.go")
|
checkAndDeleteFile("db.go")
|
||||||
cDownload("https://napi.v10lator.de/db?t=go", "db.go")
|
urllib.request.urlretrieve("https://napi.v10lator.de/db?t=go", "db.go")
|
Loading…
Add table
Add a link
Reference in a new issue