与我前一天写的ApiMapper类似,不过是通过XPath选择属性值,封装对象
ApiMapper:https://blog.csdn.net/weixin_44598449/article/details/118658663
相比于ApiMapper,只是把JsonHandler,替换为了HtmlHandler,其他几乎不变
直接看使用
源文件,这是B站的播放器页面,没有根据Bvid推荐视频的JsonAPI,推荐视频是直接前端渲染到页面上的
对应接口
相关实体类
调用结果
项目地址:https://gitee.com/shaokang123/html-mapper
这次写的确实比较水,这一篇应该于ApiMapper哪一篇进行合并。