Skip to content

Commit

Permalink
fix: fix pkg ssl error
Browse files Browse the repository at this point in the history
  • Loading branch information
txperl committed Sep 9, 2024
1 parent cd31823 commit c774a81
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 26 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ jobs:
- os: windows-2022
version: win_x86
pythonArch: 'x86'
- os: macos-14
version: mac_apple
pythonArch: 'x64'
- os: macos-12
version: mac_intel
pythonArch: 'x64'
Expand All @@ -64,9 +61,9 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10.11'
python-version: '3.7'
architecture: ${{ matrix.pythonArch }}

- name: Install Requirements
run: |
pip install -r ./requirements.txt
Expand Down Expand Up @@ -101,25 +98,24 @@ jobs:
needs: [build-on-platform]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download from Artifact
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v3
with:
name: pixivbiuArt

- name: Rename
run: |
mv ./win_x64.zip ./PixivBiu_${{ github.event.inputs.releaseTag }}_win_x64.zip
mv ./win_x86.zip ./PixivBiu_${{ github.event.inputs.releaseTag }}_win_x86.zip
mv ./mac_apple.zip ./PixivBiu_${{ github.event.inputs.releaseTag }}_mac_apple.zip
mv ./mac_intel.zip ./PixivBiu_${{ github.event.inputs.releaseTag }}_mac_intel.zip
mv ./ubuntu_x64.zip ./PixivBiu_${{ github.event.inputs.releaseTag }}_ubuntu_x64.zip
- name: Release and Done
uses: ncipollo/release-action@v1
with:
artifacts: "PixivBiu_${{ github.event.inputs.releaseTag }}_win_x64.zip, PixivBiu_${{ github.event.inputs.releaseTag }}_win_x86.zip, PixivBiu_${{ github.event.inputs.releaseTag }}_mac_apple.zip, PixivBiu_${{ github.event.inputs.releaseTag }}_mac_intel.zip, PixivBiu_${{ github.event.inputs.releaseTag }}_ubuntu_x64.zip"
artifacts: "PixivBiu_${{ github.event.inputs.releaseTag }}_win_x64.zip, PixivBiu_${{ github.event.inputs.releaseTag }}_win_x86.zip, PixivBiu_${{ github.event.inputs.releaseTag }}_mac_intel.zip, PixivBiu_${{ github.event.inputs.releaseTag }}_ubuntu_x64.zip"
tag: ${{ github.event.inputs.releaseTag }}
name: ${{ github.event.inputs.releaseName }}
body: ${{ github.event.inputs.releaseBody }}
Expand Down
6 changes: 3 additions & 3 deletions .pkg/r_cloudscraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ def loadUserAgent(self, *args, **kwargs):
else:
if self.browser and self.browser not in self.browsers:
sys.tracebacklimit = 0
raise RuntimeError('Sorry "{}" browser is not valid, valid browsers are [{}].'.format(self.browser, ', '.join(self.browsers)))
raise RuntimeError(f'Sorry "{self.browser}" browser is not valid, valid browsers are [{", ".join(self.browsers)}].')

if not self.platform:
self.platform = random.SystemRandom().choice(self.platforms)

if self.platform not in self.platforms:
sys.tracebacklimit = 0
raise RuntimeError('Sorry the platform "{}" is not valid, valid platforms are [{}]'.format(self.platform, ', '.join(self.platforms)))
raise RuntimeError(f'Sorry the platform "{self.platform}" is not valid, valid platforms are [{", ".join(self.platforms)}]')

filteredAgents = self.filterAgents(user_agents['user_agents'])

Expand All @@ -118,7 +118,7 @@ def loadUserAgent(self, *args, **kwargs):

if not filteredAgents[self.browser]:
sys.tracebacklimit = 0
raise RuntimeError('Sorry "{}" browser was not found with a platform of "{}".'.format(self.browser, self.platform))
raise RuntimeError(f'Sorry "{self.browser}" browser was not found with a platform of "{self.platform}".')

self.cipherSuite = user_agents['cipherSuite'][self.browser]
self.headers = user_agents['headers'][self.browser]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ PixivBiu,一款不错的 Pixiv **辅助**工具。

### 已编译程序

此项目基于 `Python@3.10(+)` 编写,使用 `PyInstaller` 构建编译版本。
此项目基于 `Python@3.7(+)` 编写,使用 `PyInstaller` 构建编译版本。

这里提供 Windows、macOS 和 Ubuntu 的编译版本,如有其他需求请自行编译。

Expand Down
2 changes: 1 addition & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ PixivBiu, a nice Pixiv **assistant** tool.

### Executable Binary File

This project is written in `Python@3.10(+)` and is compiled using `PyInstaller`.
This project is written in `Python@3.7(+)` and is compiled using `PyInstaller`.

Compiled versions are provided for Windows, macOS, and Ubuntu. If you have other requirements, please compile it yourself.

Expand Down
2 changes: 1 addition & 1 deletion README_JA.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ PixivBiuはPixivのための**補助的な**ツールです。

### 実行バイナリから

このプロジェクトは Python 3.10 以上で開発されており、実行バイナリのビルドには `PyInstaller` を使用しています。
このプロジェクトは Python 3.7 以上で開発されており、実行バイナリのビルドには `PyInstaller` を使用しています。

Windows 版、macOS 版と Ubuntu 版が利用可能ですが、もし必要であれば自分でビルドを試してください。

Expand Down
23 changes: 12 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
blinker==1.8.2
certifi==2024.7.4
certifi==2024.8.30
charset-normalizer==3.3.2
click==8.1.7
cloudscraper==1.2.71
Flask==3.0.3
idna==3.7
itsdangerous==2.2.0
Flask==2.2.5
idna==3.8
importlib-metadata==6.7.0
itsdangerous==2.1.2
Jinja2==3.1.4
MarkupSafe==2.1.5
pillow==10.3.0
Pillow==9.5.0
pixivpy3==3.7.5
pyparsing==3.1.2
pyparsing==3.1.4
PySocks==1.7.1
PyYAML==6.0.1
requests==2.32.3
requests==2.31.0
requests-toolbelt==1.0.0
typing_extensions==4.12.2
urllib3==2.2.2
Werkzeug==3.0.3
typing_extensions==4.7.1
urllib3==2.0.7
Werkzeug==2.2.3
zipp==3.15.0

0 comments on commit c774a81

Please sign in to comment.