下一关。。。

一张图片,于是就点击了一下。

跳转到了

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

显示的是:

and the next nothing is 44827

下一个。。。

and the next nothing is 45439

再来一个。。

Your hands are getting tired and the next nothing is 94485。。。

一直循环下去了。。。肯定是打开的方式不对。。

回到原网页,F12

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

额。回去上课,回来发代码。

这个有点坑爹。代码就直接发了。原理就是获取下一个链接的 nothing 然后用python 帮你自动进入下一个网页。大量循环。

#-*- coding:utf- -*-
#代码版本均为python 3.5.
#Level import urllib.request
import re def next_page(p):
text = urllib.request.urlopen('http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=%s' % p).read().decode('utf-8')
m = re.search('and the next nothing is ([0-9]+)', text)
if not m: print (text)
return m.group() p = for i in range(,):
print (" 第%s次运行" % i,end="")
p = next_page(p)
print (p)

所以可以得到第5关的链接。

http://www.pythonchallenge.com/pc/def/peak.html

目前对第5关一脸懵bi。。。

晚上解

pythonchallenge 解谜 Level 4的更多相关文章

  1. pythonchallenge 解谜 Level 0

    解谜地址: http://www.pythonchallenge.com/pc/def/0.html 这题没什么难度,意思就是得到2的38次方的值,然后,替换 http://www.pythoncha ...

  2. pythonchallenge 解谜 Level 6

    第六关地址 http://www.pythonchallenge.com/pc/def/channel.html 和前几关一样,首先看网页源码吧.反正不看也没办法... <html>< ...

  3. pythonchallenge 解谜 Level 8

    #-*- coding:utf-8 -*- #代码版本均为python 3.5.1 #Level 7 import bz2 un=b'BZh91AY&SYA\xaf\x82\r\x00\x00 ...

  4. pythonchallenge 解谜 Level 7

    #-*- coding:utf-8 -*- #代码版本均为python 3.5.1 #Level 7 from PIL import Image x_begin, x_end = 0, 609 y_b ...

  5. pythonchallenge 解谜 Level 5

    第五关的确很坑爹... 不过,根据之前的思路,我想着是把信息放在了 “源码” 中. 翻了下源码.有用的东西在以下部分. <html><head> <title>pe ...

  6. pythonchallenge 解谜 Level 3

    第三关. 问题的解法在于正则表达式. 首先...你应该能找到需要正则的字符在哪里...那就好了! 题意就是说: One small letter, surrounded by EXACTLY thre ...

  7. pythonchallenge 解谜 Level 2

    好吧,赶紧贴一下. #-*- coding:utf-8 -*- #代码版本均为python 3.5.1 #Level 2 import re file = open("Level 2.txt ...

  8. pythonchallenge 解谜 Level 1

    得到第一关地址后可以进行第一关的解析了. 看起来好神秘的样子.但是也就是把字母 k 变成 m , o 变成 q ,e 变成 g.将字母对应的ASCII的值+2就行了. #-*- coding:utf- ...

  9. pythonchallenge 解谜

    所有代码均使用python 3.5.1 版本 最近在学python,闲来无事觉得这个解谜还挺有意思. 解谜网址  http://www.pythonchallenge.com/ 接下来会写破解教程~

随机推荐

  1. MongoDB 效率

    写入: 插入100万条数据:用InsertMany,耗时16s左右. 读取: 读取300万条数据,耗时3600毫秒.

  2. 读取Simulink中Dataset类型的数据

    http://files.cnblogs.com/files/pursuiting/%E5%80%92%E7%AB%8B%E6%91%86%E6%8E%A7%E5%88%B6%E7%B3%BB%E7% ...

  3. Web前端之jQuery 的10大操作技巧

    不管是做什么事情,人们习惯在工作中去找方法.找技巧,来帮助提高效率,在软件开发中更是如此.jQuery作为前端开发必学技术之一,在使用中也有各种各样的小技巧,今天小编为大家分享10条必知会的技巧,希望 ...

  4. extarea输入的换行在网页上正常显示

    如图

  5. 模拟搭建Web项目的真实运行环境(七)

    下面这个是mongo驱动的小案例,里面也有涉及到一点redis的操作 https://github.com/SuperRocky/MyMongoDriver 接下来通过几张图片主要介绍一下每个文件的具 ...

  6. Spring 系列: Spring 框架简介 -7个部分

    Spring 系列: Spring 框架简介 Spring AOP 和 IOC 容器入门 在这由三部分组成的介绍 Spring 框架的系列文章的第一期中,将开始学习如何用 Spring 技术构建轻量级 ...

  7. tp框架之模板继承

    模板继承是一项更加灵活的模板布局方式,模板继承不同于模板布局,甚至来说,应该在模板布局的上层.模板继承其实并不难理解,就好比类的继承一样,模板也可以定义一个基础模板(或者是布局),并且其中定义相关的区 ...

  8. 解决升级PHP7后 微信公众号收不到消息

    服务器配置Linux+Nginx+PHP5.5+mysql index方法配置微信的关注回复.菜单事件.多客服.自动回复等 public function actionIndex() { if (is ...

  9. Oracle REGEXP_SUBSTR()

    REGEXP_SUBSTR函数格式如下: function REGEXP_SUBSTR(String, pattern, position, occurrence, modifier)       _ ...

  10. 外接Hdmi没有声音怎么设置

    参考 http://www.3lian.com/edu/2013/07-16/81152.html 在小喇叭图标上右键->播放设备->禁用HDMI