
"""simple docstring"""





from datetime import datetime

import requests
from bsa import BeautifulSoup

if __name__ == "__main__":
				_a														=		input("""Enter image url: """).strip()
				print(F"""Downloading image from {url} ...""")
				_a														=		BeautifulSoup(requests.get(url).content, """html.parser""")
				# The image URL is in the content field of the first meta tag with property og:image
				_a														=		soup.find("""meta""", {"""property""": """og:image"""})["""content"""]
				_a														=		requests.get(image_url).content
				_a														=		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 TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_a														=		{
    """configuration_autoformer""": [
        """AUTOFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """AutoformerConfig""",
    ],
}

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_a														=		[
				    """AUTOFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
				    """AutoformerForPrediction""",
				    """AutoformerModel""",
				    """AutoformerPreTrainedModel""",
				]


if TYPE_CHECKING:
				from .configuration_autoformer import (
				    AUTOFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
				    AutoformerConfig,
				)

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_autoformer import (
								    AUTOFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
								    AutoformerForPrediction,
								    AutoformerModel,
								    AutoformerPreTrainedModel,
								)

else:
				import sys

				_a														=		_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)






