Sixth off address: http://www.pythonchallenge.com/pc/def/channel.html
After entering the page, there are no other things except two images, and you can view the source code of the page.
The Source Code contains the following sentence:
<! -- <-- Zip -->
Okay, use zip to replace the channel. First, http://www.pythonchallenge.com/pc/def/zip.html.
Indeed, although this page exists, it is only a prompt function. There is only one sentence on the page:
Yes. Find the zip.
Well, let's go back to the source code of the Sixth level and continue to look at it. This sentence in the source code tells us what code is irrelevant to solving the problem:
<!-- The following has nothing to do with the riddle itself. I justthought it would be the right point to offer you to donate to thePython Challenge project. Any amount will be greatly appreciated. -thesamet-->
It means that the statement after this comment is only used to make donations and so on. It has nothing to do with solving the problem. If you ignore it, What code is useful now? Let's take a look at the following:
In the source code, there is basically no repeatable place (at the beginning, I also gave a comment on the title "Now there are pairs", and I took the page image Alt = "" border = "0" src = "https://www.paypal.com/en_US/ I /scr/pixel.gif"
Width = "1" Height = "1"> you have tried using the built-in zip method for the two text sections. Of course, you can imagine the result)
Now, let's change our mindset. What is Zip? If the English language is not good, check Google translation. Zip has a zipper and so on. Well, we can see that, the big picture on the sixth page is jeans, jeans, and zippers.
After staring at this disgusting pair of jeans, I smiled awkwardly. Isn't the zipper like y? Okay, try again -_-
The fact is that I failed again. This is also an existing page, but its prompt will make you vomit blood:
It really looks like a Y, isn' t it? Now, go back.
Decisive vomiting ..........................................
Okay, now let's look at what the zip package can be, of course, a zip package. It seems that the large image is a link on the page, and I tried to change the suffix first. There is only one sentence on it:
Http://www.pythonchallenge.com/pc/def/channel.zip
I want to submit a zip package !!!
What do we do most when we hold the compressed package? Of course, we need to decompress the package. Let's take a look at it. What about so many files? open a few and let us know ......, All are strings of the following types:
Next nothing is XXX # Note: XXX represents a numeric string
I remember that there was one in front of the Sixth level, which was similar to this kind. You should directly consider using regular expressions.
By the way, after decompression, I used OS. listdir to read the file and found a readme.txt file in the folder, which says:
welcome to my zipped list.hint1: start from 90052hint2: answer is inside the zip
OK. Write a small script to run it:
Import re, osre_match = Re. compile (r 'Next nothing is (\ D + )'). matchfname = '000000' values = [] While 1: If 'readme '= fname: print 'Find nothing.'
Break try: F = open ('Channel/audio s.txt '% fname) S = f. read () F. close () fname = re_match (s ). groups () [0] values. append (v) expires T: Print s break
Of course, in fact, the above script did not write anything, but it is enough to get an answer. We can see that the final output text is as follows:
Collect the comments.
The literal meaning is to put comments together, but comments I can only think of comments and so on.
I can't solve the problem after I got to this position. Why? Because it uses a module zipfile that I have never used, I need help from this module. (This is a failure, I can only think of the built-in function zip when I see Zip, but I don't know whether there is zipfile, which is not powerful enough.) How can I do it later? I am a Google drop, and the code is as follows:
Print ''. Join (MAP (lambda I: zipfile.zipfile('channel.zip '). getinfo (I). Comment, [I for I in values])
Values is the collection of file names saved in the above script to find the collect the comments.
The result is as follows:
Click confirm:
It's in the air. Look at the letters.
Khan, take a closer look at the hockey in the picture. H is composed of O, and O is composed of X ............
The seventh off address is:
Http://www.pythonchallenge.com/pc/def/oxygen.html
It's so exhausting. -_-, Isn't this just a brain heap ......
There is only one sentence: try