pythonchallenge_level3

简介: pythonchallenge各关解题

level3

地址:http://www.pythonchallenge.com/pc/def/equality.html
源码:git@code.aliyun.com:qianlizhixing12/PythonChallenge.git。
问题:找出页面源码一点提示注释中的前后有三个大写字符的小写字符。

#!/usr/bin/env python3
# -*- coding:UTF-8 -*-

# Level 3

import urllib.request

url = "http://www.pythonchallenge.com/pc/def/equality.html"
response = urllib.request.urlopen(url)
body = response.read()
response.close

import re

body = body.decode("utf8")
text = re.search("<!--\n(.|\s)+\n-->", body).group(0)
lis = re.findall("[^A-Z][A-Z]{3}([a-z])[A-Z]{3}[^A-Z]", text)
print("Level 3:", ''.join(lis))
相关文章
|
5月前
[WUSTCTF 2020]level3
[WUSTCTF 2020]level3
36 0
|
7月前
|
Java
【ERROR】‘<>‘ operator is not allowed for source level below 1.7
【ERROR】‘<>‘ operator is not allowed for source level below 1.7
82 0
|
编译器 Linux Windows
[√]_ITERATOR_DEBUG_LEVEL
[√]_ITERATOR_DEBUG_LEVEL
118 0
|
Python
pythonchallenge_level6
pythonchallenge各关解题
1139 0
|
Python
pythonchallenge_level11
pythonchallenge各关解题
1106 0
|
机器学习/深度学习
pythonchallenge_level9
pythonchallenge各关解题
1170 0