from datetime import datetime

import requests







def 			__UpperCamelCase     (    A				):
     UpperCamelCase__					    =   '''https://downloadgram.net/wp-json/wppress/video-downloader/video?url='''
     UpperCamelCase__					    =   requests.get(base_url + url				).json()[0]['''urls'''][0]['''src''']
     return requests.get(snake_case_				).content


if __name__ == "__main__":
     __magic_name__    		=input('''Enter Video/IGTV url: ''').strip()
     __magic_name__    		=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}.""")










"""simple docstring"""



import unittest

from transformers import is_torch_available
from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow, torch_device


if is_torch_available():
       from transformers import AutoModelForSeqaSeqLM, AutoTokenizer






@require_torch
@require_sentencepiece
@require_tokenizers
class 						__snake_case   (						unittest.TestCase	):





 """simple docstring"""


 @slow
 def    UpperCamelCase__(       self    ):



     '''simple docstring'''




     __A       :		Any							=	AutoModelForSeqaSeqLM.from_pretrained('''google/mt5-small'''   ,		return_dict=__lowerCamelCase    ).to(__lowerCamelCase    )
     __A       :		Optional[Any]							=	AutoTokenizer.from_pretrained('''google/mt5-small'''    )

     __A       :		Optional[int]							=	tokenizer('''Hello there'''   ,		return_tensors='''pt'''    ).input_ids
     __A       :		str							=	tokenizer('''Hi I am'''   ,		return_tensors='''pt'''    ).input_ids

     __A       :		Any							=	model(input_ids.to(__lowerCamelCase    )   ,		labels=labels.to(__lowerCamelCase    )    ).loss
     __A       :		Tuple							=	-(labels.shape[-1] * loss.item())

     __A       :		int							=	-8_4.9_1_2_7
     self.assertTrue(abs(mtf_score - EXPECTED_SCORE    ) < 1e-4    )




