


from __future__ import annotations

import json

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

lowerCAmelCase       =							{'UserAgent': UserAgent().random}
def 			_a (      SCREAMING_SNAKE_CASE     ):


		"""simple docstring"""




		lowercase__            =      script.contents[0]
		lowercase__            =      json.loads(data[data.find('''{"config"'''     ) : -1]     )
		return info["entry_data"]["ProfilePage"][0]["graphql"]["user"]


class        _a							:

							def __init__(							self:	List[str]    ,						UpperCamelCase_:	Optional[Any]							)			->   Tuple:





									"""simple docstring"""







									lowercase__            =      f'https://www.instagram.com/{username}/'
									lowercase__            =      self.get_json()

							def       lowerCamelCase_ (							self:	Any							)			->   dict:





									"""simple docstring"""







									lowercase__            =      requests.get(self.url    ,						headers=UpperCamelCase_							).text
									lowercase__            =      BeautifulSoup(UpperCamelCase_    ,						'''html.parser'''							).find_all('''script'''							)
									try:
											return extract_user_profile(scripts[4]							)
									except (json.decoder.JSONDecodeError, KeyError):
											return extract_user_profile(scripts[3]							)

							def __repr__(							self:	Union[str, Any]							)			->   str:





									"""simple docstring"""







									return f'{self.__class__.__name__}(\'{self.username}\')'

							def __str__(							self:	Tuple							)			->   str:





									"""simple docstring"""







									return f'{self.fullname} ({self.username}) is {self.biography}'

							@property
							def       lowerCamelCase_ (							self:	List[Any]							)			->   str:





									"""simple docstring"""







									return self.user_data["username"]

							@property
							def       lowerCamelCase_ (							self:	int							)			->   str:





									"""simple docstring"""







									return self.user_data["full_name"]

							@property
							def       lowerCamelCase_ (							self:	str							)			->   str:





									"""simple docstring"""







									return self.user_data["biography"]

							@property
							def       lowerCamelCase_ (							self:	str							)			->   str:





									"""simple docstring"""







									return self.user_data["business_email"]

							@property
							def       lowerCamelCase_ (							self:	int							)			->   str:





									"""simple docstring"""







									return self.user_data["external_url"]

							@property
							def       lowerCamelCase_ (							self:	Dict							)			->   int:





									"""simple docstring"""







									return self.user_data["edge_followed_by"]["count"]

							@property
							def       lowerCamelCase_ (							self:	Optional[Any]							)			->   int:





									"""simple docstring"""







									return self.user_data["edge_follow"]["count"]

							@property
							def       lowerCamelCase_ (							self:	Union[str, Any]							)			->   int:





									"""simple docstring"""







									return self.user_data["edge_owner_to_timeline_media"]["count"]

							@property
							def       lowerCamelCase_ (							self:	int							)			->   str:





									"""simple docstring"""







									return self.user_data["profile_pic_url_hd"]

							@property
							def       lowerCamelCase_ (							self:	Optional[int]							)			->   bool:





									"""simple docstring"""







									return self.user_data["is_verified"]


							@property
							def       lowerCamelCase_ (							self:	str							)			->   bool:





									"""simple docstring"""







									return self.user_data["is_private"]
def 			_a (      SCREAMING_SNAKE_CASE = "github"     ):


		"""simple docstring"""




		import os

		if os.environ.get('''CI'''     ):
				return  # test failing on GitHub Actions
		lowercase__            =      InstagramUser(SCREAMING_SNAKE_CASE     )
		assert instagram_user.user_data
		assert isinstance(instagram_user.user_data						,				SCREAMING_SNAKE_CASE     )
		assert instagram_user.username == username
		if username != "github":
				return
		assert instagram_user.fullname == "GitHub"
		assert instagram_user.biography == "Built for developers."
		assert instagram_user.number_of_posts > 1_50
		assert instagram_user.number_of_followers > 12_00_00
		assert instagram_user.number_of_followings > 15
		assert instagram_user.email == "support@github.com"
		assert instagram_user.website == "https://github.com/readme"
		assert instagram_user.profile_picture_url.startswith('''https://instagram.'''     )
		assert instagram_user.is_verified is True
		assert instagram_user.is_private is False


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			lowerCAmelCase       =							InstagramUser('github')
			print(instagram_user)
			print(f"""{instagram_user.number_of_posts = }""")
			print(f"""{instagram_user.number_of_followers = }""")
			print(f"""{instagram_user.number_of_followings = }""")
			print(f"""{instagram_user.email = }""")
			print(f"""{instagram_user.website = }""")
			print(f"""{instagram_user.profile_picture_url = }""")
			print(f"""{instagram_user.is_verified = }""")
			print(f"""{instagram_user.is_private = }""")






def 			_a (      SCREAMING_SNAKE_CASE						,				SCREAMING_SNAKE_CASE						,				SCREAMING_SNAKE_CASE     ):


		"""simple docstring"""




		if exponent == 1:
				return base
		if exponent % 2 == 0:
				lowercase__            =      _modexpt(SCREAMING_SNAKE_CASE						,				exponent // 2						,				SCREAMING_SNAKE_CASE     ) % modulo_value
				return (x * x) % modulo_value
		else:
				return (base * _modexpt(SCREAMING_SNAKE_CASE						,				exponent - 1						,				SCREAMING_SNAKE_CASE     )) % modulo_value
def 			_a (      SCREAMING_SNAKE_CASE = 17_77						,				SCREAMING_SNAKE_CASE = 18_55						,				SCREAMING_SNAKE_CASE = 8     ):


		"""simple docstring"""




		lowercase__            =      base
		for _ in range(1						,				SCREAMING_SNAKE_CASE     ):
				lowercase__            =      _modexpt(SCREAMING_SNAKE_CASE						,				SCREAMING_SNAKE_CASE						,				10**digits     )

		return result


if __name__ == "__main__":
			print(f"""{solution() = }""")


