Skip to content

Commit

Permalink
Add back string parsing example
Browse files Browse the repository at this point in the history
  • Loading branch information
angelogladding authored Dec 3, 2023
1 parent b2b0f28 commit 0354be0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -57,6 +57,15 @@ Import the parser using:

```

```pycon
>>> mf2json = mf2py.parse(doc="<a class=h-card href=https://example.com>James</a>")
>>> mf2json["items"]
[{'type': ['h-card'],
'properties': {'name': ['James'],
'url': ['https://example.com']}}]

```

### Parse an HTML Document from a URL

```pycon
Expand Down

0 comments on commit 0354be0

Please sign in to comment.