0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MemoryEnhancer > MEDC > test_get_markdown_180126.py > Markdownをとってくる

Last updated at Posted at 2018-01-26
動作環境
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>

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?