Skip to content

Commit 2844ee5

Browse files
committed
explain some network issues
1 parent bc58403 commit 2844ee5

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This repository includes solutions to the Python Challenge quizzes for practice
44

55
Website: [The Python Challenge](http://www.pythonchallenge.com/) — enjoy!
66

7-
(There are bugs in level_13、level_17 under python 3.13 on 2025.)
7+
(There are network issues in level_13、level_15、level_17 in China.)
88

99
### Level 0
1010
2 to 38 = ?

level_13.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Phone that (remote) evil.
55
import re
66
import xmlrpc.client
7+
from ftplib import print_line
78

89
PREFIX = "http://huge:file@www.pythonchallenge.com/pc/return/"
910
url = PREFIX + '../phonebook.php'
@@ -12,9 +13,10 @@
1213
def solve(url):
1314
print("Looking up Bert(Evil):")
1415
phonebook = xmlrpc.client.ServerProxy(url)
16+
# This line will raise an exception if you're within the Great Firewall (GFW).
1517
response = phonebook.phone('Bert')
1618
whom = re.findall(r'[A-Z]+', response)[0].lower()
17-
println(whom)
19+
print_line(whom)
1820

1921
return whom
2022

level_15.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def solve(year):
2929
# 1756/01/27
3030

3131
wikiurl = 'https://en.wikipedia.org/wiki/January_27'
32+
# This line will raise an exception if you're within the Great Firewall (GFW).
3233
r = requests.get(wikiurl)
3334
text = catch(r.text, '<li><a href="/wiki/' + year + '.*?</a>(.*?)</li>')
3435
text = re.findall(r'<a.*?>(.+?)</a>', text)[0]

level_17.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def solve(url):
5252
import xmlrpc.client
5353

5454
url2 = PREFIX_AUTH + '../phonebook.php'
55+
# This line will raise an exception if you're within the Great Firewall (GFW).
5556
phonebook = xmlrpc.client.ServerProxy(url2)
5657
response = phonebook.phone('Leopold')
5758
whom = catch(response, r'[A-Z]+').lower()

0 commit comments

Comments
 (0)