Created
April 20, 2020 10:26
-
-
Save kevsersrca/da20d804e9c1f80dd822ecf9647bb60f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
def checkUrl(url): | |
r = requests.get(url) | |
soup = BeautifulSoup(r.text, 'html.parser') | |
types = set() | |
for item in soup.find_all(itemtype=True): | |
types.add(item.get('itemtype')) | |
for t in types: | |
if t: | |
print('- contains a "{}" schema'.format(t)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tested url :
https://www.allrecipes.com/recipe/95294/chewy-caramel/