
"""simple docstring"""



import webbrowser
from sys import argv
from urllib.parse import parse_qs, quote

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
 UpperCAmelCase      		=			'%20'.join(argv[1:]) if len(argv) > 1 else quote(str(input('''Search: ''')))

 print('''Googling.....''')

 UpperCAmelCase      		=			F"""https://www.google.com/search?q={query}&num=100"""

 UpperCAmelCase      		=			requests.get(
     url,
     headers={'''User-Agent''': str(UserAgent().random)},
 )

 try:
  UpperCAmelCase      		=			(
      BeautifulSoup(res.text, '''html.parser''')
      .find('''div''', attrs={'''class''': '''yuRUbf'''})
      .find('''a''')
      .get('''href''')
  )

 except AttributeError:
  UpperCAmelCase      		=			parse_qs(
      BeautifulSoup(res.text, '''html.parser''')
      .find('''div''', attrs={'''class''': '''kCrYT'''})
      .find('''a''')
      .get('''href''')
  )['url'][0]

 webbrowser.open(link)





"""simple docstring"""



import math






def       lowerCamelCase					(a_						:int)     ->							bool:
       assert isinstance(a_				,				a_) and (
           number >= 0
       ), "'number' must been an int and positive"

       if 1 < number < 4:
              # 2 and 3 are primes
              return True
       elif number < 2 or not number % 2:
              # Negatives, 0, 1 and all even numbers are not primes
              return False

       lowercase		:Any       							=				range(3				,				int(math.sqrt(a_) + 1)				,				2)
       return not any(not number % i for i in odd_numbers)






def       lowerCamelCase					(a_						:Optional[int]				,				a_						:Optional[int]=1				,				**a_						:List[str])     ->							Any:
       lowercase		:str       							=				factor * value
       lowercase		:int       							=				value

       while not is_prime(a_):
              value += 1 if not ("desc" in kwargs and kwargs["desc"] is True) else -1

       if value == first_value_val:
              return next_prime(value + 1				,				**a_)
       return value

