
'''simple docstring'''



from __future__ import annotations




class     UpperCAmelCase_	:






						'''simple docstring'''






						def __init__(   self       ,  _lowercase       ,  _lowercase ):

												"""simple docstring"""



												_lowerCAmelCase		,       _lowerCAmelCase    		=					text, pattern
												_lowerCAmelCase		,       _lowerCAmelCase    		=					len(_lowercase ), len(_lowercase )




						def    _lowercase      (   self       ,  _lowercase ):

												"""simple docstring"""



												for i in range(self.patLen - 1       ,  -1       ,  -1 ):
																		if char == self.pattern[i]:
																								return i
												return -1




						def    _lowercase      (   self       ,  _lowercase ):

												"""simple docstring"""



												for i in range(self.patLen - 1       ,  -1       ,  -1 ):
																		if self.pattern[i] != self.text[current_pos + i]:
																								return current_pos + i
												return -1




						def    _lowercase      (   self ):

												"""simple docstring"""



												_lowerCAmelCase    		=					[]
												for i in range(self.textLen - self.patLen + 1 ):
																		_lowerCAmelCase    		=					self.mismatch_in_text(_lowercase )
																		if mismatch_index == -1:
																								positions.append(_lowercase )
																		else:
																								_lowerCAmelCase    		=					self.match_in_pattern(self.text[mismatch_index] )
																								_lowerCAmelCase    		=					(
																								    mismatch_index - match_index
																								)  # shifting index lgtm [py/multiple-definition]
												return positions






_lowercase          =						"""ABAABA"""
_lowercase          =						"""AB"""
_lowercase          =						BoyerMooreSearch(text, pattern)
_lowercase          =						bms.bad_character_heuristic()

if len(positions) == 0:
						print("""No match found""")
else:
						print("""Pattern found in following positions: """)
						print(positions)


'''simple docstring'''



import sys
import webbrowser

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
						print("""Googling.....""")
						_lowercase          =						"""https://www.google.com/search?q=""" + """ """.join(sys.argv[1:])
						_lowercase          =						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)
						_lowercase          =						BeautifulSoup(res.text, """html.parser""")
						_lowercase          =						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')}""")
