From 6d02de42105e1fa390984c665fd73b8e6f6116f5 Mon Sep 17 00:00:00 2001 From: A Farzat Date: Wed, 8 Oct 2025 12:48:20 +0300 Subject: Modify analyser tests to reflect the use of extractor --- tests/utils/vid_url_to_html.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/utils/vid_url_to_html.py') diff --git a/tests/utils/vid_url_to_html.py b/tests/utils/vid_url_to_html.py index 355e830..60f6ccc 100644 --- a/tests/utils/vid_url_to_html.py +++ b/tests/utils/vid_url_to_html.py @@ -1,6 +1,7 @@ from urllib.parse import urlparse, parse_qs from components.extractor.check_url import is_video +from .get_random_vid_info import get_random_vid_duration def extract_vid_id(url: str) -> str: if not is_video(url): @@ -16,3 +17,6 @@ def extract_vid_id(url: str) -> str: def get_vid_html_from_url(url: str) -> str: with open(f'tests/data/video@{extract_vid_id(url)}.html', 'r') as file: return file.read() + +def obtain_vid_duration(url:str, html: str = '') -> int: + return get_random_vid_duration(url) -- cgit v1.2.3-70-g09d2