





def 	_SCREAMING_SNAKE_CASE		(      SCREAMING_SNAKE_CASE		:Optional[int]   )      ->   Optional[int]:
 __lowerCAmelCase					:	List[str]      =       [0] * len(SCREAMING_SNAKE_CASE   )
 __lowerCAmelCase					:	str      =       []
 __lowerCAmelCase					:	int      =       []
 __lowerCAmelCase					:	Optional[Any]      =       0

 for values in graph.values():
  for i in values:
   indegree[i] += 1

 for i in range(len(SCREAMING_SNAKE_CASE   )   ):
  if indegree[i] == 0:
   queue.append(SCREAMING_SNAKE_CASE   )

 while queue:
  __lowerCAmelCase					:	Tuple      =       queue.pop(0   )
  cnt += 1
  topo.append(SCREAMING_SNAKE_CASE   )
  for x in graph[vertex]:
   indegree[x] -= 1
   if indegree[x] == 0:
    queue.append(SCREAMING_SNAKE_CASE   )

 if cnt != len(SCREAMING_SNAKE_CASE   ):
  print("""Cycle exists"""   )
 else:
  print(SCREAMING_SNAKE_CASE   )


# Adjacency List of Graph
_UpperCAmelCase             =							{0: [1, 2], 1: [3], 2: [3], 3: [4, 5], 4: [], 5: []}







topological_sort(graph)






from datetime import datetime

import requests






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


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