



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

     print('Googling.....')

     a_      :      Optional[int]    =     f'https://www.google.com/search?q={query}&num=100'

     a_      :      Optional[int]    =     requests.get(
         url,
         headers={'User-Agent': str(UserAgent().random)},
     )

     try:
          a_      :      Optional[int]    =     (
              BeautifulSoup(res.text, 'html.parser')
              .find('div', attrs={'class': 'yuRUbf'})
              .find('a')
              .get('href')
          )

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

     webbrowser.open(link)










a_      :      str    =     6_55_21






def     __a					(		__UpperCAmelCase       ):
 a__												= 1
 a__												= 0
 for plain_chr in plain_text:
  a__												= (a + ord(__UpperCAmelCase       )) % MOD_ADLER
  a__												= (b + a) % MOD_ADLER
 return (b << 16) | a





