

'''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__":
 lowerCAmelCase__											=	'''%20'''.join(argv[1:]) if len(argv) > 1 else quote(str(input('''Search: ''')))

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

 lowerCAmelCase__											=	f'https://www.google.com/search?q={query}&num=100'

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

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

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

 webbrowser.open(link)









"""simple docstring"""





import string







def      lowerCamelCase__       (							_lowerCamelCase       :		str )      ->				None:
  for key in range(len(string.ascii_uppercase ) ):
    lowerCamelCase_         =						''
    for symbol in message:
      if symbol in string.ascii_uppercase:
        lowerCamelCase_         =						string.ascii_uppercase.find(_lowerCamelCase )
        lowerCamelCase_         =						num - key
        if num < 0:
          lowerCamelCase_         =						num + len(string.ascii_uppercase )
        lowerCamelCase_         =						translated + string.ascii_uppercase[num]
      else:
        lowerCamelCase_         =						translated + symbol
    print(F'''Decryption using Key #{key}: {translated}''' )







def      lowerCamelCase__       (							)      ->				None:
  lowerCamelCase_         =						input('Encrypted message: ' )
  lowerCamelCase_         =						message.upper()
  decrypt(_lowerCamelCase )


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  main()




