




"""simple docstring"""
import bsa
import requests






def 				__lowerCAmelCase					(					__lowerCAmelCase			:		bsa.element.ResultSet						)    ->       Dict:
 return {
     "name": soup.ha.a.text,
     "genre": soup.find("span"  ,	class_="genre"						).text.strip(),
     "rating": soup.strong.text,
     "page_link": f"https://www.imdb.com{soup.a.get('href'						)}",
 }






def 				__lowerCAmelCase					(					__lowerCAmelCase			:		int = 5						)    ->       Union[str, Any]:
 _UpperCamelCase      :	Tuple					      =  int(float(a__						)						)
 if num_movies < 1:
  return ()
 _UpperCamelCase      :	List[Any]					      =  (
     "https://www.imdb.com/search/title?title_type="
     f"feature&sort=num_votes,desc&count={num_movies}"
 )
 _UpperCamelCase      :	List[str]					      =  bsa.BeautifulSoup(requests.get(a__						).content  ,	"html.parser"						)
 return tuple(
     get_movie_data_from_soup(a__						)
     for movie in source.find_all("div"  ,	class_="lister-item mode-advanced"						)						)


if __name__ == "__main__":
    import json

    _SCREAMING_SNAKE_CASE						 =     int(input("""How many movies would you like to see? """))
    print(
        """, """.join(
            json.dumps(movie, indent=4) for movie in get_imdb_top_movies(num_movies)
        )
    )





'''simple docstring'''







def   lowerCAmelCase(  a__    :  int = 1000      ):







       '''simple docstring'''






       lowerCamelCase__				   =      0
       for i in range(a__      ):
              if i % 3 == 0 or i % 5 == 0:
                     result += i
       return result


if __name__ == "__main__":
    print(f'{solution() = }')

