GithubHelp home page GithubHelp logo

zhihao1021 / myselfanimedownloader_webui Goto Github PK

View Code? Open in Web Editor NEW
5.0 0.0 0.0 4.22 MB

Myself下載器,使用Web UI。下載方式部份參考至 https://github.com/hgalytoby/MyselfAnimeDownloader

Python 41.02% CSS 44.94% JavaScript 8.44% HTML 5.58% Batchfile 0.02%

myselfanimedownloader_webui's Introduction

MyselfAnimeDownloader_WebUI

Myself下載器,使用Web UI。下載方式部份參考至 https://github.com/hgalytoby/MyselfAnimeDownloader

此程式依賴於Myself,需網站存在才可使用。

當前版本

Release 1.3

  1. 修正requests函式例外處理Logger位置。
  2. 關閉SSL驗證,避免部分電腦發生憑證錯誤。
  3. 棄用websockets套件,改為aiohttp附帶之WebSocket。

運行依賴

1.此專案依賴於FFmpeg,請確保在電腦環境中有FFmpeg。 2.也可選擇下載帶有FFmpeg版本。

檢查方式:

  • 1.開啟命令提示字元 (Win+R輸入cmd後按確定)。
  • 2.再命令提示字元中輸入ffmpeg -version
  • 3.輸入後請確保畫面中有出現類似以下內容之畫面。 Imgur
  • 4.如果出現ffmpeg' 不是內部或外部命令、可執行的程式或批次檔。,請依照說明安裝FFmpeg

運行說明 - 透過EXE

1.前往Release頁面。

2.選擇MyselfAnimeDownloader WebUI.exe並下載。

3.下載完成後啟動程式,Windwos會跳出警示因為我沒買憑證,請按其他資訊 > 仍要執行

4.完成。

※注意事項:為了降低網路流量,在運行時會產生快取檔案,因此建議創建一個資料夾,並將程式放置於其中運行。

運行說明 - 透過Python

1.建議使用Python 3.10以上的版本
雖然我的開發環境是在Python 3.10.4,但大部分的語法應該都可以兼容於Python 3.6以後的版本,所以基本上Python 3.6以後的版本都可以運行。

2.從Github獲取更新(可選,但不建議,因為平常會在兩個地方工作,所以)

3.創建虛擬環境(可選)
使用python3 -m venv .venv創建一個位於.venv的虛擬環境。

4.安裝依賴套件
使用pip3 -r .\requirements.txt安裝依賴套件。

5.運行程式
使用python3 main.py運行程式。

開發日誌(22023/02/26)

查看開發日誌

開發環境

 - Windows:
    - 版本: Windows 10 Pro 21H1
    - OS組建: 19043.2130
 
 - Environment
    - Python: 3.10.4
    - pip: 22.0.4
    - FFmpeg: 2022-04-28-git-ec07b15477-full_build
 
 - Browser
    - Opera GX
       - 版本: LVL 4 (core: 93.0.4585.78)
       - Chromium 版本: 107.0.5304.110
    - Microsoft Edge
       - 版本: 108.0.1462.54
       - Chromium 版本: 108.0.0.0

 - IDE
    - Visual Studio Code     v1.74.1
    - Extensions
       - Pylance             v2022.3.1
       - Python              v2022.20.1
       - HTML CSS Support    v1.13.1
       - Markdown All in One v3.5.0

附錄-安裝FFmpeg

1.前往FFmpeg官方網站,並點擊Download按鈕。 Imgur

2.將游標移至左下角Windows圖示上,並點擊下方第一個連結Windows builds from gyan.devImgur

3.在網頁中間點擊ffmpeg-git-full.7z進行下載。 Imgur

4.下載完成後將其解壓縮並放置到任意處,在這裡以C:\作為示範。 Imgur

5.進入資料夾內尋找bin資料夾,將資料夾的路徑複製下來。

  • 注意:是bin資料夾的路徑,複製下來的路徑應類似於C:\ffmpeg-2022-12-21-git-eef763c705-full_build\bin,結尾是binImgur

6.開啟設定,點擊系統 > 關於Imgur

7.尋找相關設定 > 進階系統設定,開啟系統內容視窗。 Imgur

8.點擊環境變數(N)...,並在上方xxx 的使用者變數(U)方塊內找到PathImgur

9.點擊編輯開啟編輯視窗,並按右方新增(N),隨後將剛剛複製的路徑貼上。 Imgur

10.點擊確定關閉所有視窗後,再次開啟命令提示字元並輸入ffmpeg -version檢查,若出現類似於以下畫面之內容就是成功了。 Imgur

myselfanimedownloader_webui's People

Contributors

zhihao1021 avatar

Stargazers

 avatar Neoxy avatar  avatar  avatar duduru avatar

myselfanimedownloader_webui's Issues

你好像沒有了解 async 。

我稍微看了一下你程式碼,我發現你應該不了解在 async 底下使用會卡 io 的同步方法會發生什麼事情。

例如 subprocess

https://github.com/AloneAlongLife/MyselfAnimeDownloader_WebUI/blob/master/anime_module/m3u8.py#L128

你應該使用要 async subprocess

https://docs.python.org/3/library/asyncio-subprocess.html

你如果要用一般寫入檔案的方法你應該要用 async 的套件。

例如你這邊 https://github.com/AloneAlongLife/MyselfAnimeDownloader_WebUI/blob/master/anime_module/m3u8.py#L98

你應該要使用這類的套件

https://github.com/Tinche/aiofiles 或者 https://github.com/alexdelorenzo/aiopath

我稍微看你的程式碼,建議你了解一下 async 不然就用一般 def + thread,當然你覺得程式能跑就好,那就沒問題了。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.