



"""simple docstring"""





import random
def 						__lowerCAmelCase    (		__UpperCamelCase   :      int       ,			__UpperCamelCase   :      float       ,			__UpperCamelCase   :      bool = False     ):


						'''simple docstring'''






						snake_case_ :			dict            =      {i: [] for i in range(__UpperCamelCase     )}

						# if probability is greater or equal than 1, then generate a complete graph
						if probability >= 1:
												return complete_graph(__UpperCamelCase     )
						# if probability is lower or equal than 0, then return a graph without edges
						if probability <= 0:
												return graph

						# for each couple of nodes, add an edge from u to v
						# if the number randomly generated is greater than probability probability
						for i in range(__UpperCamelCase     ):
												for j in range(i + 1       ,			__UpperCamelCase     ):
																		if random.random() < probability:
																								graph[i].append(__UpperCamelCase     )
																								if not directed:
																														# if the graph is undirected, add an edge in from j to i, either
																														graph[j].append(__UpperCamelCase     )
						return graph
def 						__lowerCAmelCase    (		__UpperCamelCase   :      int     ):


						'''simple docstring'''






						return {
						    i: [j for j in range(__UpperCamelCase     ) if i != j] for i in range(__UpperCamelCase     )
						}


if __name__ == "__main__":
					import doctest

					doctest.testmod()






from datetime import datetime

import requests

def        __a			(   __lowerCAmelCase   )     ->     bytes:
					SCREAMING_SNAKE_CASE							:     int						=				'https://downloadgram.net/wp-json/wppress/video-downloader/video?url='
					SCREAMING_SNAKE_CASE							:     Any						=				requests.get(base_url + url   ).json()[0]['urls'][0]['src']
					return requests.get(__lowerCAmelCase   ).content


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