動作環境
Ubuntu 16.04.3 LTS desktop amd64
tmux 2.1-3build1
Python 2.7.12
Python 3.5.2
処理概要
- GitHub上のMarkdownをとってくる
- 特定の位置にある文字列を表示する
-
<td>
を含む行の一つ目
-
MEDC
Memory Enhancer Data Collectorの意味。
参考
code
test_get_markdown_180126.py
import requests as rq
IN_URL = "https://github.com/yasokada/TechEnglish_170903/blob/master/data/5290.html.md"
res = rq.get(IN_URL)
for elem in str(res.content).split('\\n'):
if "<td>" in elem:
print(elem)
break
run
$ python3 test_get_markdown_180126.py
<td><div>Cycle the power by powering down the device, then powering it on again.</div></td>