Saturday, 2 May 2020

Python Get Meta Data Content

Get meta tag content property with BeautifulSoup and Python

from bs4 import BeautifulSoup
title = soup.find("meta",  property="og:title")

Reference Site:
https://stackoverflow.com/questions/36768068/get-meta-tag-content-property-with-beautifulsoup-and-python
https://stackoverflow.com/questions/38009787/how-to-extract-meta-description-from-urls-using-python


How to use python pyquery to get metadata content
Not sure
keyword = query("meta[name='keywords']").text()

Reference Site:
https://stackoverflow.com/questions/20382578/how-can-i-get-content-value-from-meta-tag-using-pyquery

No comments:

Post a Comment

聯邦數位帳戶NewNewBank推薦碼,15%高利息優惠

 好推分享!New New Bank數位帳戶【推薦開戶】台幣高利活儲、投資下單手續費優惠等超多好康,立即開戶: https://newnewbank.ubot.com.tw/web/#/S0101001?pm=3&ID=ZZIDIHI 透過上面連結開戶,你會享有一個月15...