From acf3b1838bb02d1e1de43975d62b39b56ac19cc2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Jan 2022 13:33:03 +0000 Subject: [PATCH] bumps --- .github/workflows/codeql-analysis.yml | 70 +++++++++++++++++++++++++++ README.md | 10 +++- requirements.txt | 5 +- ytdlbot/downloader.py | 14 ++---- 4 files changed, 84 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..a75e2f3 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,70 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '38 9 * * 4' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'python' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://git.io/codeql-language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/README.md b/README.md index 8e43f35..5d21fc5 100644 --- a/README.md +++ b/README.md @@ -218,14 +218,20 @@ terms - View Terms of Service settings - Set your preference ``` -# Test video +# Test data + +## Test video https://www.youtube.com/watch?v=BaW_jenozKc -# Test Playlist +## Test Playlist https://www.youtube.com/playlist?list=PL1Hdq7xjQCJxQnGc05gS4wzHWccvEJy0w +## Test m3u8 + +https://dmesg.app/m3u8/prog_index.m3u8 + # Donation * [Buy me a coffee](https://www.buymeacoffee.com/bennythink) diff --git a/requirements.txt b/requirements.txt index 623ec9c..7974a6d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,11 @@ pyrogram==1.2.20 tgcrypto==1.2.2 yt-dlp==2021.12.27 -youtube-dl==2021.6.6 -APScheduler==3.7.0 +APScheduler==3.8.1 beautifultable==1.0.1 ffmpeg-python==0.2.0 PyMySQL==1.0.2 -celery==5.2.2 +celery==5.2.3 filetype==1.0.9 flower==1.0.0 diff --git a/ytdlbot/downloader.py b/ytdlbot/downloader.py index 4c050de..62d4ce4 100644 --- a/ytdlbot/downloader.py +++ b/ytdlbot/downloader.py @@ -17,20 +17,14 @@ import time import fakeredis import filetype - -from utils import current_time - -if os.getenv("downloader") == "youtube-dl": - import youtube_dl as ytdl - from youtube_dl import DownloadError -else: - import yt_dlp as ytdl - from yt_dlp import DownloadError +import yt_dlp as ytdl +from yt_dlp import DownloadError from config import ENABLE_VIP, TG_MAX_SIZE from db import Redis from limit import VIP -from utils import adjust_formats, apply_log_formatter, get_user_settings +from utils import (adjust_formats, apply_log_formatter, current_time, + get_user_settings) r = fakeredis.FakeStrictRedis() apply_log_formatter()