/opt/alt/python-internal/lib64/python3.11/urllib/__pycache__
Edit: /opt/alt/python-internal/lib64/python3.11/urllib/__pycache__/robotparser.cpython-311.pyc (13353B)
§
ñ§OÕ ùýpã ó˜ — d Z ddlZddlZddlZdgZ ej dd¦ « Z G d„ d¦ « Z G d„ d¦ « Z G d „ d
¦ « Z
dS )a% robotparser.py
Copyright (C) 2000 Bastian Kleineidam
You can choose between two licenses when using this package:
1) GNU GPLv2
2) PSF license for Python 2.2
The robots.txt Exclusion Protocol is implemented as specified in
http://www.robotstxt.org/norobots-rfc.txt
é NÚRobotFileParserÚRequestRatezrequests secondsc ó\ — e Zd ZdZdd„Zd„ Zd„ Zd„ Zd„ Zd„ Z d „ Z
d
„ Zd„ Zd„ Z
d
„ Zd„ ZdS )r zs This class provides a set of methods to read, parse and answer
questions about a single robots.txt file.
Ú c ó„ — g | _ g | _ d | _ d| _ d| _ | |¦ « d| _ d S )NFr )ÚentriesÚsitemapsÚ
default_entryÚdisallow_allÚ allow_allÚset_urlÚlast_checked©ÚselfÚurls ú?/opt/alt/python-internal/lib64/python3.11/urllib/robotparser.pyÚ__init__zRobotFileParser.__init__ sG € ؈ŒØˆŒ
Ø!ˆÔØ!ˆÔ؈ŒØ�Š�SÑÔÐØˆÔÐÐó c ó — | j S )z·Returns the time the robots.txt file was last fetched.
This is useful for long-running web spiders that need to
check for new robots.txt files periodically.
)r ©r s r ÚmtimezRobotFileParser.mtime% s
€ ð Ô Ð r c ó@ — ddl }| ¦ « | _ dS )zYSets the time the robots.txt file was last fetched to the
current time.
r N)Útimer )r r s r ÚmodifiedzRobotFileParser.modified. s# € ð
ˆˆˆØ ŸIšI™KœKˆÔÐÐr c ó| — || _ t j |¦ « dd… \ | _ | _ dS )z,Sets the URL referring to a robots.txt file.é é N)r ÚurllibÚparseÚurlparseÚhostÚpathr s r r
zRobotFileParser.set_url6 s4 € àˆŒÝ%œ|×4Ò4°SÑ9Ô9¸!¸A¸#Ô>шŒ �4”9�9�9r c ó° — t j | j ¦ « }| ¦ « }| | d¦ « ¦ « ¦ « dS # t j j $ rK}|j
dv rd| _ n)|j
dk r|j
dk rd| _ Y d}~dS Y d}~dS Y d}~dS Y d}~dS d}~ww xY w)z4Reads the robots.txt URL and feeds it to the parser.zutf-8)i‘ i“ Ti� iô N)
r ÚrequestÚurlopenr Úreadr ÚdecodeÚ
splitlinesÚerrorÚ HTTPErrorÚcoder r )r ÚfÚrawÚerrs r r&