




import bsa
import requests




def       SCREAMING_SNAKE_CASE			( __UpperCamelCase    :		bsa.element.ResultSet   )						->							dict[str, str]:
    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       SCREAMING_SNAKE_CASE			( __UpperCamelCase    :		int = 5   )						->							tuple:
    UpperCAmelCase_											=  int(float(__UpperCamelCase   )   )
    if num_movies < 1:
        return ()
    UpperCAmelCase_											=  (
        '''https://www.imdb.com/search/title?title_type='''
        f'feature&sort=num_votes,desc&count={num_movies}'
    )
    UpperCAmelCase_											=  bsa.BeautifulSoup(requests.get(__UpperCamelCase   ).content ,  '''html.parser'''   )
    return tuple(
        get_movie_data_from_soup(__UpperCamelCase   )
        for movie in source.find_all('''div''' ,  class_='''lister-item mode-advanced'''   )   )


if __name__ == "__main__":
 import json

 _lowerCamelCase    				=		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)
     )
 )











def       SCREAMING_SNAKE_CASE			( )						->							List[Any]:
    UpperCAmelCase_											=  1

    while True:
        if (
            sorted(str(__UpperCamelCase   )   )
            == sorted(str(2 * i   )   )
            == sorted(str(3 * i   )   )
            == sorted(str(4 * i   )   )
            == sorted(str(5 * i   )   )
            == sorted(str(6 * i   )   )
        ):
            return i

        i += 1


if __name__ == "__main__":
 print(solution())





