2020-02-02から1日間の記事一覧
はじめに Pythonの次のライブラリ/便利メソッドの簡単な紹介です。 BeautifulSoup4のfind_allであるhtmlの全てのimgタグとそのsrc属性の抜き出し urllib.parse.urljoin(こちらの記事https://itdepends.hateblo.jp/entry/2020/02/02/142148) os.path.commonp…
はじめに Pythonの標準ライブラリの os.urllib.parse.urljoin os.path.join os.path.normpath のスニペット事例紹介です。 特に、os.urllib.parse.urljoinについては、 「/a/b/c/foo.html」と「../../common/img/z.jpg」を引数に与えると、「/a/common/img/z…