Porting from Java org.jsoup and need Class equivalents

36 views
Skip to first unread message

Nathaniel Mills

unread,
Aug 9, 2024, 10:55:54 AM8/9/24
to beautifulsoup
I'm porting Java code to Python and the Java code used org.jsoup. I believe BeautifulSoup (bs4) will be the best replacement. However, there are classes I need for parameter references in my methods. So far, I believe I can use these mappings from Java -> Python but was wondering if someone has gone through this slog and could provide some advice:
Tag -> Tag
Node -> PageElement
Element -> Node (PageElement)
TextNode -> NavigableString
Document -> BeautifulSoup

Thanks in advance for any help you can provide.

Best Regards, Nat

Nathaniel Mills

unread,
Aug 12, 2024, 11:56:09 AM8/12/24
to beautifulsoup
I've decided to just port the logic to BeautifulSoup and use its native classes, etc. as there isn't a good one to one mapping.
Reply all
Reply to author
Forward
0 new messages