Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SwiftSoup to parse Open Graph metadata #1505

Merged
merged 13 commits into from
Sep 17, 2024
Merged

Conversation

joshuatbrown
Copy link
Contributor

@joshuatbrown joshuatbrown commented Sep 13, 2024

Issues covered

#1165

Description

The SwiftSoup implementation of an Open Graph metadata parser.

How to test

Run unit tests

Notes

This PR depends on the API I defined for Open Graph fetching and parsing, which is in #1503. I think of that PR and branch as the main or base branch here, and I plan to create other PRs just like this one with alternative implementations.

We're going with this approach! I've updated this PR to target main.

An alternative implementation for Open Graph parsing is in #1504. It doesn't work.

@joshuatbrown joshuatbrown changed the title Open graph/swiftsoup Use SwiftSoup to parse Open Graph metadata Sep 13, 2024
@mplorentz
Copy link
Member

LGTM. This seems like just what we need! And given that #1504 doesn't work for some sites it doesn't seem like a viable option. The way you set it up seems simple and well-abstracted enough to switch out SwiftSoup for some other HTML parser if it causes us problems.

Looking over SwiftSoup's repository, I don't see any discussion of performance or any benchmarks which feels like a bit of a red flag for a parsing library. But I also don't see a lot of issues where people are complaining about performance. It seems well-maintained, so let's give it a shot.

@joshuatbrown joshuatbrown changed the base branch from open-graph/base to main September 17, 2024 18:23
@joshuatbrown joshuatbrown marked this pull request as ready for review September 17, 2024 18:24
@joshuatbrown joshuatbrown added this pull request to the merge queue Sep 17, 2024
Merged via the queue into main with commit be00fb5 Sep 17, 2024
4 checks passed
@joshuatbrown joshuatbrown deleted the open-graph/swiftsoup branch September 17, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants