Server IP : 192.158.238.246 / Your IP : 18.117.232.234 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python37/lib/python3.7/site-packages/bs4/__pycache__/ |
Upload File : |
B �.�`� � @ s d Z dZddlZddlmZ ddlmZ ddlZddlmZm Z ddl mZ ddlZddl Z ddlZddlZddlZddlZddlZddlZdd � Zd#dd�ZG d d� de�Zdd� ZdZdZd$dd�Zd%dd�Zd&dd�Zd'dd�Zd(d d!�Zed"k�reej� � � dS ))z=Diagnostic functions, mainly for use when doing tech support.�MIT� N)�StringIO)� HTMLParser)� BeautifulSoup�__version__)�builder_registryc C s< t dt � t dtj � dddg}x>|D ]6}x0tjD ]}||jkr6P q6W |�|� t d| � q*W d|kr�|�ddg� y*dd l m } t d d�tt |j�� � W n* tk r� } zt d� W d d }~X Y nX d|k�r"ydd l}t d|j � W n, tk �r } zt d� W d d }~X Y nX t| d��r8| �� } nhtj�| ��rpt d| � t| ��}|�� } W d Q R X n0| �d��s�| �d��r�t d| � t d� d S t � x�|D ]�}t d| � d} yt| |�} d} W n8 tk �r } zt d| � t�� W d d }~X Y nX | �r*t d| � t | �� � t d� �q�W d S )z/Diagnostic suite for isolating common problems.z'Diagnostic running on Beautiful Soup %szPython version %szhtml.parser�html5lib�lxmlz;I noticed that %s is not installed. Installing it may help.�xmlr )�etreezFound lxml version %s�.z.lxml is not installed or couldn't be imported.NzFound html5lib version %sz2html5lib is not installed or couldn't be imported.�readz7"%s" looks like a filename. Reading data from the file.zhttp:zhttps:z<"%s" looks like a URL. Beautiful Soup is not an HTTP client.zpYou need to use some other library to get the document behind the URL, and feed that document to Beautiful Soup.z#Trying to parse your markup with %sFTz%s could not parse the markup.z#Here's what %s did with the markup:zP--------------------------------------------------------------------------------)�printr �sys�versionr Zbuilders�features�remove�appendr r �join�map�strZLXML_VERSION�ImportErrorr �hasattrr �os�path�exists�open� startswithr � Exception� traceback� print_excZprettify)�dataZ basic_parsers�nameZbuilderr �er �fp�parser�success�soup� r( �=/opt/alt/python37/lib/python3.7/site-packages/bs4/diagnose.py�diagnose sd r* Tc K sN ddl m} x<|jt| �fd|i|��D ]\}}td||j|jf � q(W dS )z�Print out the lxml events that occur during parsing. This lets you see how lxml parses a document when no Beautiful Soup code is running. r )r �htmlz%s, %4s, %sN)r r Z iterparser r �tag�text)r! r+ �kwargsr �event�elementr( r( r) � lxml_traceT s $r1 c @ s` e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� Zdd� Zdd� Z dS )�AnnouncingParserz?Announces HTMLParser parse events, without doing anything else.c C s t |� d S )N)r )�self�sr( r( r) �_pa s zAnnouncingParser._pc C s | � d| � d S )Nz%s START)r5 )r3 r"