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

找不到匯入的專案  請確認 <Import> 宣告中的路徑正確,而且檔案存在於磁碟上。

【Problem】  C:\inetpub\wwwroot\project\project.csproj : error  : 找不到匯入的專案 "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\W...