File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11
11
# http://www.pythonchallenge.com/pc/ring/bell.html
12
12
13
13
from auth import get_last_src_url
14
- from auth import open_url
14
+ from auth import read_url
15
+ from io import BytesIO
15
16
from itertools import islice
16
17
from PIL import Image as Image
17
18
18
19
19
20
img_url = get_last_src_url ("http://www.pythonchallenge.com/pc/ring/bell.html" )
20
- greens = islice (Image .open (open_url ( img_url )).tobytes (), 1 , None , 3 )
21
+ greens = islice (Image .open (BytesIO ( read_url ( img_url ) )).tobytes (), 1 , None , 3 )
21
22
for curr , prev in zip (greens , greens ):
22
- if abs (curr - prev ) != 42 : # the ultimate answer, oh!! ! Boring mission 😒
23
+ if abs (curr - prev ) != 42 : # 😱 the ultimate answer! Boring mission 😒
23
24
print (chr (abs (curr - prev )), end = "" )
25
+ print (" (hint: ‘it’ is Python)" )
You can’t perform that action at this time.
0 commit comments