


'''simple docstring'''







from datetime import datetime

import requests
from bsa import BeautifulSoup

if __name__ == "__main__":
       lowerCAmelCase    :     Any					=						input("""Enter image url: """).strip()
       print(F'''Downloading image from {url} ...''')
       lowerCAmelCase    :     Union[str, Any]					=						BeautifulSoup(requests.get(url).content, """html.parser""")
       # The image URL is in the content field of the first meta tag with property og:image
       lowerCAmelCase    :     Optional[int]					=						soup.find("""meta""", {"""property""": """og:image"""})["""content"""]
       lowerCAmelCase    :     Dict					=						requests.get(image_url).content
       lowerCAmelCase    :     int					=						F'''{datetime.now():%Y-%m-%d_%H:%M:%S}.jpg'''
       with open(file_name, """wb""") as fp:
              fp.write(image_data)
       print(F'''Done. Image saved to disk as {file_name}.''')





'''simple docstring'''







from typing import Any






def 			lowercase				(_A					):







       """simple docstring"""







       if not input_list:
              return []
       _lowerCAmelCase    :							Optional[int]   			=       [input_list.count(_A					) for value in input_list]
       _lowerCAmelCase    :							int   			=       max(_A					)  # Gets the maximum count in the input list.
       # Gets values of modes
       return sorted({input_list[i] for i, value in enumerate(_A					) if value == y}					)


if __name__ == "__main__":
       import doctest

       doctest.testmod()

