From 284fd3fdf703d0a715606da5b5332ccf1fbd07dc Mon Sep 17 00:00:00 2001 From: Miguel Ramalho <19508417+msramalho@users.noreply.github.com> Date: Sat, 18 Jun 2022 00:16:12 +0200 Subject: [PATCH] fix tests --- .github/workflows/main.yml | 4 ++-- vk_url_scraper/scraper.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe1318e..fbbc034 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,10 +30,10 @@ jobs: fail-fast: false matrix: python: ['3.7', '3.10'] - task: + task: # --show-capture=no on purpose - name: Test run: | - pytest --color=yes tests/ + pytest --show-capture=no --color=yes tests/ include: - python: '3.10' diff --git a/vk_url_scraper/scraper.py b/vk_url_scraper/scraper.py index 30e3b2a..eafd11c 100644 --- a/vk_url_scraper/scraper.py +++ b/vk_url_scraper/scraper.py @@ -28,6 +28,7 @@ class VkScraper: "payload": {"more": "original JSON response as dict which you can parse for more data"} } """ + WALL_PATTERN = re.compile(r"(wall.{0,1}\d+_\d+)") PHOTO_PATTERN = re.compile(r"(photo.{0,1}\d+_\d+)") VIDEO_PATTERN = re.compile(r"(video.{0,1}\d+_\d+)") @@ -186,7 +187,7 @@ class VkScraper: ---------- video_ids : List[str] list with valid video ids like "video123123_1231" - + Returns ------- a list of dict as specified in the class documentation. @@ -242,7 +243,7 @@ class VkScraper: ---------- photo_ids : List[str] list with valid photo ids like "photo123123_1231" - + Returns ------- a list of dict as specified in the class documentation.