관리-도구
편집 파일: parser.cpython-36.opt-2.pyc
3 ��2a� � @ s| d dddddgZ ddlmZmZ ddlmZmZ dd lmZ G d d � d �Z G dd� de �Z G dd� d�ZG d d� de�ZdS )�Parser�HeaderParser�BytesParser�BytesHeaderParser� FeedParser�BytesFeedParser� )�StringIO� TextIOWrapper)r r )�compat32c @ s0 e Zd Zd ed�dd�Zddd�Zddd �ZdS ) r N)�policyc C s || _ || _d S )N)�_classr )�selfr r � r �+/opt/alt/python36/lib64/python3.6/parser.py�__init__ s zParser.__init__Fc C sD t | j| jd�}|r|j� x|jd�}|s.P |j|� qW |j� S )N)r i )r r r Z_set_headersonly�readZfeed�close)r �fp�headersonlyZ feedparser�datar r r �parse) s zParser.parsec C s | j t|�|d�S )N)r )r r )r �textr r r r �parsestr; s zParser.parsestr)N)F)F)�__name__� __module__�__qualname__r r r r r r r r r s c @ s e Zd Zddd�Zddd�ZdS ) r Tc C s t j| |d�S )NT)r r )r r r r r r r H s zHeaderParser.parsec C s t j| |d�S )NT)r r )r r r r r r r K s zHeaderParser.parsestrN)T)T)r r r r r r r r r r G s c @ s( e Zd Zdd� Zd dd�Zd dd�ZdS )r c O s t ||�| _d S )N)r �parser)r �args�kwr r r r Q s zBytesParser.__init__Fc C s, t |ddd�}z| jj||�S |j� X d S )N�ascii�surrogateescape)�encoding�errors)r r r �detach)r r r r r r r c s zBytesParser.parsec C s |j ddd�}| jj||�S )N�ASCIIr )r"