【Python】Beautiful Soup を使って 特定の文字を抽出してみる 2018年7月10日 dev Python コメントを残す HFTP ↓こちらのサイトを参考に、Beautiful Soup を使って metaタグのog:urlを抽出してみる import requests from bs4 import BeautifulSoup url = "【URLが入ります】" res = requests.get(url) soup = BeautifulSoup(res.text, "html.parser") og_url = soup.find_all(attrs={"property": "og:url"}) ↑↑↑ Page Top へ ↑↑↑HFTP