






import sys
import webbrowser

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
							print('''Googling.....''')
							A_       :Tuple       =						'''https://www.google.com/search?q=''' + ''' '''.join(sys.argv[1:])
							A_       :str       =						requests.get(url, headers={'''UserAgent''': UserAgent().random})
							# res.raise_for_status()
							with open('''project1a.html''', '''wb''') as out_file:  # only for knowing the class
														for data in res.iter_content(10000):
																					out_file.write(data)
							A_       :List[Any]       =						BeautifulSoup(res.text, '''html.parser''')
							A_       :List[Any]       =						list(soup.select('''.eZt8xd'''))[:5]

							print(len(links))
							for link in links:
														if link.text == "Maps":
																					webbrowser.open(link.get('''href'''))
														else:
																					webbrowser.open(f"https://google.com{link.get('href')}")



"""simple docstring"""




def lowercase_  (   _snake_case						):
							if a < 0:
														raise ValueError("""Input value must be a positive integer"""						)
							elif isinstance(_snake_case   ,_snake_case						):
														raise TypeError("""Input value must be a 'int' type"""						)
							return bin(_snake_case						).count("""1"""						)


if __name__ == "__main__":
					import doctest

					doctest.testmod()




