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

JsoupXpath处理含空格字符文本后与原始文本不一致 #80

Open
KamiNoYuki opened this issue May 2, 2023 · 0 comments
Open

Comments

@KamiNoYuki
Copy link

为了便于快速识别您的问题,请认真回答以下问题,谢谢!
Please answer these questions before submitting your issue. Thanks!

  1. 使用的表达式与使用场景,确保能够复现(What did you do , If possible, provide a recipe for reproducing the error.)?

使用Jsoup抓取网页的一个script中的json内容
表达式://script[contains(text(),'player_aa')]/text()
问题在于空格丢失,请看以url开头那一行的字符串末尾01后面,步骤2里正确的字符串中01后有2个空格,但抓取到的01后面只有1个空格,这会导致链接无法访问。

  1. 期望看到什么(What did you expect to see)?

"url":"https:\/\/arlnigh.me\/d\/\u5bab\u4e0b\u52a8\u6f2b\/2014\/\u56db\u6708\u662f\u4f60\u7684\u8c0e\u8a00\/01 \u5355\u8c03\u591a\u5f69.m3u8"

  1. JsoupXpath给出的结果是什么(What did you see instead)?

"url":"https:\/\/arlnigh.me\/d\/\u5bab\u4e0b\u52a8\u6f2b\/2014\/\u56db\u6708\u662f\u4f60\u7684\u8c0e\u8a00\/01 \u5355\u8c03\u591a\u5f69.m3u8"

  1. 当前使用的版本(What version of JsoupXpath are you using)?

版本:2.5.3

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

No branches or pull requests

1 participant