Python Challenge Solutions
    Level 0
    Level 1
    Level 2
    Level 3
    Level 4
    Level 5
    Level 6
    Level 7
    Level 8
    Level 9
    Level 10

Python Challenge - Level 29



Notice that there "silent" empty lines in the html source code. And the lines are of different lengths. Convert the lengths to bytes and decompress by bz2:

from urllib.request import Request, urlopen
import bz2, base64

req = Request('')
req.add_header('Authorization', 'Basic %s' % base64.b64encode(b'repeat:switch').decode())
raw = urlopen(req).read().splitlines()[12:]
data = bytes([len(i) for i in raw])
b"Isn't it clear? I am yankeedoodle!"

Next Level