Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/pywhatkit/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/pywhatkit/__pycache__/misc.cpython-312.pyc

�

(ٜg��
�@�ddlZddlZddlZddlmZddlmZddlZddl	Z	ddl
mZe�j�dvrddl
mZ	ddeded	ed
dfd�Zdej&�d
dfdededededed
dfd�Zdd�Zd dededed
eefd�Zd!dededed
efd�Zded
dfd�Zy)"�N)�system)�Optional)�
exceptions)�windows�darwin)�	ImageGrab�	file_name�delay�show�returnc��tj|�tj�}|r|j	|��|j|�d��y)zTake Screenshot of the Screen)�titlez.pngN)�time�sleepr�grabr�save)r	r
r�screens    �9/usr/local/lib/python3.12/site-packages/pywhatkit/misc.py�take_screenshotrs@��
	
�
�
�5�����!����K�K�i�K�(����y�k��&�'�zScreenshot.jpgi�i8�link�filename�path�width�heightc��d|�d|�d|��}tj|d��}|jdk(rMttj
j
||�d�5}|D]}|j|��	ddd�yy#1swYyxYw)	z1Take Screenshot of Any Website Without Opening itz+https://render-tron.appspot.com/screenshot/z/?width=z&height=T)�stream���wbN)�requests�get�status_code�open�osr�join�write)	rrrrr�url�response�file�chunks	         r�web_screenshotr+s���
8��v�X�e�W�H�U[�T\�
]�C��|�|�C��-�H����s�"�
�"�'�'�,�,�t�X�.��
5��!���
�
�5�!�"�6�
5�#�
5�
5�s�B�B	c���	tdd�5}|j�}ddd�t�dk(rtd�yt|�y#1swY�/xYw#t$rtd�YywxYw)z,Prints the Log File Generated by the LibraryzPyWhatKit_DB.txt�rNrzNo Logs in File!zLog File does not Exist!)r#�read�len�print�FileNotFoundError)r)�contents  r�show_historyr3,sb��	�
�$�c�
*�d��i�i�k�G�+�
�w�<�1���$�%��'�N�+�
*���*�
�(�)�*�s'�A�A
�A�
A�A�A0�/A0�topic�lines�return_valuec�P�tj||��}t|�|r|Sy)zGives Information on the Topic)�	sentencesN)�	wikipedia�summaryr0)r4r5r6�datas    r�infor<;s*�����U�e�4�D�	�$�K����r�use_api�
open_videoc�f�|r�tjd|���}|j}|dk(rK|r.tj|j
j
d��|j
j
d�Sd|cxkrdkrnytjd��yd|��}d}tj|�}|j
}t|�}|jd	�}	|	D]}
|d
z
}|
dk(s�n|	|dz
d
k(rtd��|rtjd|	|dz
���d|	|dz
��S)zPlay a YouTube Videoz/https://pywhatkit.herokuapp.com/playonyt?topic=r�asciii�iWz(Unable to access pywhatkit api right nowz"https://www.youtube.com/results?q=r�"��WEB_PAGE_TYPE_WATCH�z/resultszNo Video Found for this Topic!zhttps://www.youtube.comN)r r!r"�webr#r2�decoder�UnableToAccessApi�str�split�	Exception)r4r=r>r(r"r'�count�contr;�lst�is           r�playonytrODsF����<�<�=�e�W�E�
���*�*���#�������)�)�0�0��9�:��#�#�*�*�7�3�3�
�K�
&�3�
&��.�.�:��
�'�
3�5�'�:�����|�|�C� ���|�|���4�y���j�j��o���A��Q�J�E��)�)����u�q�y�>�Z�'��<�=�=���H�H�.�s�5�1�9�~�.>�?�@�(��U�Q�Y��(8�9�9rc�8�d|��}tj|�y)z"Searches About the Topic on Googlez https://www.google.com/search?q=N)rEr#)r4rs  r�searchrQgs��.�e�W�5�D��H�H�T�Nr)�pywhatkit_screenshot�T)rN)�F)FT)r$r�
webbrowserrE�platformr�typingrr r9�pywhatkit.corer�lower�PILrrH�int�boolr�getcwdr+r3r<rOrQ�rr�<module>r_s��	�������%�	�8�>�>��,�,��OS�	(��	(�8;�	(�GK�	(�	
�	(�%���	�	����"�

�"��"��"��	"�

�"�
�
"�"����C��4��H�S�M�� :�C� :�$� :�D� :�C� :�F�#��$�r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists