


"""simple docstring"""







import pytest

from datasets import inspect_metric, list_metrics, load_metric




@pytest.fixture
def        UpperCAmelCase__	(lowerCAmelCase_       ):




					'''simple docstring'''


					monkeypatch.setattr("datasets.utils.deprecation_utils._emitted_deprecation_warnings"  ,						set()       )




@pytest.fixture
def        UpperCAmelCase__	(lowerCAmelCase_       ):




					'''simple docstring'''


					class 			UpperCamelCase_     :

						"""simple docstring"""





						def __init__(			self      :    List[Any]      ,      UpperCAmelCase__      :    Optional[int]       )	->     List[str]:
											__SCREAMING_SNAKE_CASE						       =    metric_id




					class 			UpperCamelCase_     :

						"""simple docstring"""





						snake_case__    :  Dict    =      [MetricMock(UpperCamelCase) for metric_id in ["accuracy", "mse", "precision", "codeparrot/apps_metric"]]




						def   UpperCAmelCase_				(			self      :    List[str]       )	->     Union[str, Any]:
											return self._metrics


					monkeypatch.setattr("datasets.inspect.huggingface_hub"  ,						HfhMock()       )




@pytest.mark.parametrize(
    "func, args"  ,						[(load_metric, ("metrics/mse",)), (list_metrics, ()), (inspect_metric, ("metrics/mse", "tmp_path"))]       )
def        UpperCAmelCase__	(lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_       ):




					'''simple docstring'''


					if "tmp_path" in args:
										__SCREAMING_SNAKE_CASE						       =    tuple(arg if arg != "tmp_path" else tmp_path for arg in args       )
					with pytest.warns(lowerCAmelCase_  ,						match="https://huggingface.co/docs/evaluate"       ):
										func(*lowerCAmelCase_       )




"""simple docstring"""







from datetime import datetime

import requests




def        UpperCAmelCase__	(lowerCAmelCase_       ):




					'''simple docstring'''


					__SCREAMING_SNAKE_CASE						       =    "https://downloadgram.net/wp-json/wppress/video-downloader/video?url="
					__SCREAMING_SNAKE_CASE						       =    requests.get(base_url + url       ).json()[0]["urls"][0]["src"]
					return requests.get(lowerCAmelCase_       ).content


if __name__ == "__main__":
		a__    :							str            =					input('''Enter Video/IGTV url: ''').strip()
		a__    :							List[Any]            =					F"{datetime.now():%Y-%m-%d_%H:%M:%S}.mp4"
		with open(file_name, '''wb''') as fp:
				fp.write(download_video(url))
		print(F"Done. Video saved to disk as {file_name}.")
