관리-도구
편집 파일: formfill.cpython-38.pyc
U *�e�% � @ sv d dl mZmZ d dlmZmZ d dlmZmZmZm Z d dlm Z d dlZze W n e k rl eZY nX dddd d dgZG dd� de�Zed deid�Zed�dd� dD ��deid�Zeddeid�Zed�Zd2dd�Zd3dd�Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd4d$d%�Zd&d'� Z G d(d� d�Z!e!� Z"ddd)e"fd*d �Z#d+d � Z$d,d-� Z%d.d/� Z&d0d1� Z'dS )5� )�XPath�ElementBase)� fromstring�XHTML_NAMESPACE)�_forms_xpath�_options_xpath�_nons�_transform_result)�defsN�FormNotFound� fill_form�fill_form_html� insert_errors�insert_errors_html�DefaultErrorCreatorc @ s e Zd ZdZdS )r z* Raised when no form can be found N)�__name__� __module__�__qualname__�__doc__� r r �B/opt/hc_python/lib64/python3.8/site-packages/lxml/html/formfill.pyr s zKdescendant-or-self::form[name=$name]|descendant-or-self::x:form[name=$name]�x)� namespaces�|c C s g | ]}d | �qS )zdescendant-or-self::r )�.0Z_tagr r r � <listcomp> s r )�input�select�textareazx:inputzx:selectz x:textareaz-//label[@for=$for_id]|//x:label[@for=$for_id]z"descendant-or-self::*[@name=$name]c C s t | ||d�} t| |� d S �N��form_id� form_index)� _find_form� _fill_form)�el�valuesr! r"