



'''simple docstring'''
from math import atan, cos, radians, sin, tan

from .haversine_distance import haversine_distance

snake_case_			:     str  	=  6378137.0
snake_case_			:     int  	=  6356752.314245
snake_case_			:     Any  	=  6378137






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_							):
						_UpperCamelCase :		Any			    =       (AXIS_A - AXIS_B) / AXIS_A
						# Parametric latitudes
						# https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
						_UpperCamelCase :		Any			    =       atan((1 - flattening) * tan(radians(__a							)							)							)
						_UpperCamelCase :		Any			    =       atan((1 - flattening) * tan(radians(__a							)							)							)

						# Compute central angle between two points
						# using haversine theta. sigma =  haversine_distance / equatorial radius
						_UpperCamelCase :		Tuple			    =       haversine_distance(__a  ,  __a  ,  __a  ,  __a							) / EQUATORIAL_RADIUS

						# Intermediate P and Q values
						_UpperCamelCase :		Optional[Any]			    =       (b_lata + b_lata) / 2
						_UpperCamelCase :		Union[str, Any]			    =       (b_lata - b_lata) / 2

						# Intermediate X value
						# X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
						_UpperCamelCase :		List[str]			    =       (sin(__a							) ** 2) * (cos(__a							) ** 2)
						_UpperCamelCase :		Any			    =       cos(sigma / 2							) ** 2
						_UpperCamelCase :		int			    =       (sigma - sin(__a							)) * (x_numerator / x_demonimator)

						# Intermediate Y value
						# Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
						_UpperCamelCase :		Dict			    =       (cos(__a							) ** 2) * (sin(__a							) ** 2)
						_UpperCamelCase :		Optional[Any]			    =       sin(sigma / 2							) ** 2
						_UpperCamelCase :		Dict			    =       (sigma + sin(__a							)) * (y_numerator / y_denominator)

						return EQUATORIAL_RADIUS * (sigma - ((flattening / 2) * (x_value + y_value)))


if __name__ == "__main__":
					import doctest

					doctest.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}.""")


