
import requests
from bsa import BeautifulSoup



def       _lowercase					(      __SCREAMING_SNAKE_CASE				,    __SCREAMING_SNAKE_CASE )	->     str:
			UpperCamelCase__    :		str     =				(
			    'https://www.horoscope.com/us/horoscopes/general/'
			    F"""horoscope-general-daily-{day}.aspx?sign={zodiac_sign}"""
			)
			UpperCamelCase__    :		Dict     =				BeautifulSoup(requests.get(__SCREAMING_SNAKE_CASE ).content				,    'html.parser' )
			return soup.find('div'				,    class_='main-horoscope' ).p.text


if __name__ == "__main__":
							print('''Daily Horoscope. \n''')
							print(
							    '''enter your Zodiac sign number:\n''',
							    '''1. Aries\n''',
							    '''2. Taurus\n''',
							    '''3. Gemini\n''',
							    '''4. Cancer\n''',
							    '''5. Leo\n''',
							    '''6. Virgo\n''',
							    '''7. Libra\n''',
							    '''8. Scorpio\n''',
							    '''9. Sagittarius\n''',
							    '''10. Capricorn\n''',
							    '''11. Aquarius\n''',
							    '''12. Pisces\n''',
							)
							UpperCAmelCase__				:  List[Any]       					=				int(input('''number> ''').strip())
							print('''choose some day:\n''', '''yesterday\n''', '''today\n''', '''tomorrow\n''')
							UpperCAmelCase__				:  Optional[int]       					=				input('''enter the day> ''')
							UpperCAmelCase__				:  str       					=				horoscope(zodiac_sign, day)
							print(horoscope_text)





def       _lowercase					(      __SCREAMING_SNAKE_CASE = "mytext.txt"				,    __SCREAMING_SNAKE_CASE = False )	->     None:
			import socket

			UpperCamelCase__    :		Tuple     =				1_2312  # Reserve a port for your service.
			UpperCamelCase__    :		Optional[int]     =				socket.socket()  # Create a socket object
			UpperCamelCase__    :		Optional[int]     =				socket.gethostname()  # Get local machine name
			sock.bind((host, port) )  # Bind to the port
			sock.listen(5 )  # Now wait for client connection.

			print('Server listening....' )

			while True:
						UpperCamelCase__   ,			UpperCamelCase__    :		Optional[int]     =				sock.accept()  # Establish connection with client.
						print(F"""Got connection from {addr}""" )
						UpperCamelCase__    :		Union[str, Any]     =				conn.recv(1024 )
						print(F"""Server received: {data = }""" )

						with open(__SCREAMING_SNAKE_CASE				,    'rb' ) as in_file:
									UpperCamelCase__    :		Tuple     =				in_file.read(1024 )
									while data:
												conn.send(__SCREAMING_SNAKE_CASE )
												print(F"""Sent {data!r}""" )
												UpperCamelCase__    :		str     =				in_file.read(1024 )

						print('Done sending' )
						conn.close()
						if testing:  # Allow the test to complete
									break

			sock.shutdown(1 )
			sock.close()


if __name__ == "__main__":
							send_file()



