From 0354be07da5401fad75a6fc71e65b83ca71f990f Mon Sep 17 00:00:00 2001 From: Angelo Gladding Date: Sat, 2 Dec 2023 17:00:01 -0800 Subject: [PATCH] Add back string parsing example --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a4f8cc9..2b9587e 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Import the parser using: ``` -### Parse an HTML Document from a string +### Parse an HTML Document from a file or string ```pycon >>> with open("test/examples/eras.html") as fp: @@ -57,6 +57,15 @@ Import the parser using: ``` +```pycon +>>> mf2json = mf2py.parse(doc="James") +>>> mf2json["items"] +[{'type': ['h-card'], + 'properties': {'name': ['James'], + 'url': ['https://example.com']}}] + +``` + ### Parse an HTML Document from a URL ```pycon