


'''simple docstring'''







from __future__ import annotations






def       lowercase					(_A       ):







       """simple docstring"""







       if not nums:
              return 0
       _lowerCAmelCase     :				Any       =							nums[0]
       _lowerCAmelCase     :				Tuple       =							0
       for num in nums[1:]:
              _lowerCAmelCase      ,  _lowerCAmelCase     :				Dict       =							(
                  max_excluding + num,
                  max(__lowerCAmelCase ,    __lowerCAmelCase       ),
              )
       return max(__lowerCAmelCase ,    __lowerCAmelCase       )


if __name__ == "__main__":
       import doctest

       doctest.testmod()







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

      print("""Googling.....""")

      __magic_name__  :  List[Any]					=       F"https://www.google.com/search?q={query}&num=100"

      __magic_name__  :  Union[str, Any]					=       requests.get(
          url,
          headers={"""User-Agent""": str(UserAgent().random)},
      )

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

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

      webbrowser.open(link)

