Python challenge – #04

Czwarte zadanie

adreshttp://www.pythonchallenge.com/pc/def/linkedlist.html
na tej stronie widzimy tylko jedno słowo: linkedlist.php. Idźmy tam 🙂 http://www.pythonchallenge.com/pc/def/linkedlist.php

tytuł strony: follow the chain
podpowiedź: ze źródła strony

<!-- urllib may help. DON'T TRY ALL NOTHINGS, since it will never end. 400 times is more than enough. -->

W źródle widzę też, że obrazek jest linkiem.
rozwiązanie:
Klikam w obrazek. Zostaję przekierowana na

http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=12345

Strona mówi mi tylko:

and the next nothing is 44827.

Spróbuję użyć urllib i zobaczę gdzie mnie zaprowadzi.

https://gist.github.com/jezinka/def988f752ddd88251fce0065dc1ec72

w pewnym momencie dostaję:

and the next nothing is 54249
and the next nothing is 29247
and the next nothing is 13115
and the next nothing is 23053
and the next nothing is 3875
and the next nothing is 16044
Yes. Divide by two and keep going.

Zmodyfikowałam kod i lecimy od nowa:

https://gist.github.com/jezinka/2b4e1dbb106d1dc76849638fb002a208

Dzięki wyszukiwaniu tylko tego co stoi przy nothing udało mi się uniknąć kolejnej pułapki

and the next nothing is 49574
and the next nothing is 82682
There maybe misleading numbers in the 
text. One example is 82683. Look only for the next nothing and the next nothing is 63579

Nagle pośród tego łańcucha niczego pojawia się inny komunikat:

peak.html

Gdybym nie patrzyła, to mogłabym to pominąć, więc zmodyfikuję trochę kod i pędzę dalej:

https://gist.github.com/jezinka/ffb4a0b76f375082add63b257635979e

adres kolejnej zagadki: http://www.pythonchallenge.com/pc/def/peak.html

Dodaj komentarz

Twój adres e-mail nie zostanie opublikowany. Wymagane pola są oznaczone *

Witryna wykorzystuje Akismet, aby ograniczyć spam. Dowiedz się więcej jak przetwarzane są dane komentarzy.