



'''simple docstring'''



from __future__ import annotations

import csv

import requests
from bsa import BeautifulSoup



def   __lowerCAmelCase					(							lowerCamelCase   :						str = ""					):






	'''simple docstring'''




	__lowerCAmelCase												=  url or "https://www.imdb.com/chart/top/?ref_=nv_mv_250"
	__lowerCAmelCase												=  BeautifulSoup(requests.get(lowerCamelCase					).text				,		"html.parser"					)
	__lowerCAmelCase												=  soup.find_all("td"				,		attrs="titleColumn"					)
	__lowerCAmelCase												=  soup.find_all("td"				,		class_="ratingColumn imdbRating"					)
	return {
	    title.a.text: float(rating.strong.text					)
	    for title, rating in zip(lowerCamelCase				,		lowerCamelCase					)
	}



def   __lowerCAmelCase					(							lowerCamelCase   :						str = "IMDb_Top_250_Movies.csv"					):






	'''simple docstring'''




	__lowerCAmelCase												=  get_imdb_top_aaa_movies()
	with open(lowerCamelCase				,		"w"				,		newline=""					) as out_file:
		__lowerCAmelCase												=  csv.writer(lowerCamelCase					)
		writer.writerow(["Movie title", "IMDb rating"]					)
		for title, rating in movies.items():
			writer.writerow([title, rating]					)


if __name__ == "__main__":
	write_movies()




'''simple docstring'''



import re



def   __lowerCAmelCase					(							lowerCamelCase   :						str					):






	'''simple docstring'''




	__lowerCAmelCase												=  re.compile(
	    r"^(?:0|94|\+94|0{2}94)" r"7(0|1|2|4|5|6|7|8)" r"(-| |)" r"\d{7}$"					)

	return bool(re.search(lowerCamelCase				,		lowerCamelCase					)					)


if __name__ == "__main__":
	lowerCAmelCase	:		Optional[Any]				=   '''0094702343221'''

	print(is_sri_lankan_phone_number(phone))