



'''simple docstring'''
from __future__ import annotations






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_ = None  ,  UpperCAmelCase_ = None							):
						if start is None:
												_UpperCamelCase :		Optional[int]			    =       0

						if end is None:
												_UpperCamelCase :		List[Any]			    =       len(UpperCAmelCase_							) - 1

						if start >= end:
												return

						_UpperCamelCase :		Union[str, Any]			    =       (start + end) // 2

						slowsort(UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_							)
						slowsort(UpperCAmelCase_  ,  mid + 1  ,  UpperCAmelCase_							)

						if sequence[end] < sequence[mid]:
												_UpperCamelCase    ,      _UpperCamelCase :		Any			    =       sequence[mid], sequence[end]

						slowsort(UpperCAmelCase_  ,  UpperCAmelCase_  ,  end - 1							)


if __name__ == "__main__":
					from doctest import testmod

					testmod()







'''simple docstring'''
from datetime import datetime

import requests






def A__   (					UpperCAmelCase_							):
						_UpperCamelCase :		List[Any]			    =       'https://downloadgram.net/wp-json/wppress/video-downloader/video?url='
						_UpperCamelCase :		Optional[int]			    =       requests.get(base_url + url							).json()[0]['urls'][0]['src']
						return requests.get(UpperCAmelCase_							).content


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


