File tree Expand file tree Collapse file tree 4 files changed +6
-2
lines changed
Expand file tree Collapse file tree 4 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ This repository includes solutions to the Python Challenge quizzes for practice
44
55Website: [ 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
10102 to 38 = ?
Original file line number Diff line number Diff line change 44# Phone that (remote) evil.
55import re
66import xmlrpc .client
7+ from ftplib import print_line
78
89PREFIX = "http://huge:file@www.pythonchallenge.com/pc/return/"
910url = PREFIX + '../phonebook.php'
1213def 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
Original file line number Diff line number Diff 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 ]
Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments