Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
2d95f1ad
Kaydet (Commit)
2d95f1ad
authored
Mar 13, 2004
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SF patch #911431: robot.txt must be robots.txt
(Contributed by George Yoshida.)
üst
3aa82c07
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
robotparser.py
Lib/robotparser.py
+2
-2
cheatsheet
Misc/cheatsheet
+1
-1
No files found.
Lib/robotparser.py
Dosyayı görüntüle @
2d95f1ad
...
...
@@ -83,7 +83,7 @@ class RobotFileParser:
self
.
entries
.
append
(
entry
)
def
parse
(
self
,
lines
):
"""parse the input lines from a robot.txt file.
"""parse the input lines from a robot
s
.txt file.
We allow that a user-agent: line is not preceded by
one or more blank lines."""
state
=
0
...
...
@@ -148,7 +148,7 @@ class RobotFileParser:
def
can_fetch
(
self
,
useragent
,
url
):
"""using the parsed robots.txt decide if useragent can fetch url"""
_debug
(
"Checking robot.txt allowance for:
\n
user agent:
%
s
\n
url:
%
s"
%
_debug
(
"Checking robot
s
.txt allowance for:
\n
user agent:
%
s
\n
url:
%
s"
%
(
useragent
,
url
))
if
self
.
disallow_all
:
return
False
...
...
Misc/cheatsheet
Dosyayı görüntüle @
2d95f1ad
...
...
@@ -1962,7 +1962,7 @@ repr Redo repr() but with limits on most sizes.
rexec Restricted execution facilities ("safe" exec, eval, etc).
rfc822 RFC-822 message manipulation class.
rlcompleter Word completion for GNU readline 2.0.
robotparser Parse robot.txt files, useful for web spiders.
robotparser Parse robot
s
.txt files, useful for web spiders.
sched A generally useful event scheduler class.
sets Module for a set datatype.
sgmllib A parser for SGML.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment