diff --git a/.github/workflows/tests.yml b/.github/workflows/sync-tests.yml similarity index 76% rename from .github/workflows/tests.yml rename to .github/workflows/sync-tests.yml index 85adb2c..dd8ac45 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/sync-tests.yml @@ -1,7 +1,14 @@ name: HQPorner API test +permissions: + contents: read + pull-requests: write + on: push: + branches: + - master + - async pull_request: schedule: - cron: '0 0 * * 0' # Runs every Sunday at 00:00 UTC @@ -19,7 +26,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest requests lxml bs4 git+https://github.com/EchterAlsFake/eaf_base_api + pip install pytest + pip install . - name: Test with pytest run: | pytest diff --git a/README.md b/README.md index bf281aa..9849834 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,13 @@
Downloads + Downloads (Async) CodeQL Analysis - API Tests + API Tests + API Tests
+ # Description HQPorner API is an API for HQPorner. It allows you to fetch information from videos using regexes and requests. diff --git a/hqporner_api/api.py b/hqporner_api/api.py index 1bd5049..3d1fe93 100644 --- a/hqporner_api/api.py +++ b/hqporner_api/api.py @@ -222,7 +222,7 @@ def get_thumbnails(self) -> list: query = title.replace(" ", "+") html_content = core.fetch(url=f"{root_url}/?q={query}") - soup = BeautifulSoup(html_content) + soup = BeautifulSoup(html_content, features="html.parser") divs = soup.find_all('div', class_='row') for div in divs: