-
Notifications
You must be signed in to change notification settings - Fork 12
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
错误的解析了多个,但在jsoup是正常的 #20
Comments
Hi @Matcha-xiaobin, could you please provide me with a sample code and the HTML code or link necessary for reproducing this issue? |
@itboy87 期望的正确结果是: |
@Matcha-xiaobin the issue is related to the charset. We will fix it as soon as possible. Thanks |
好的 |
@Matcha-xiaobin , I have fixed this issue in the latest version (0.1.1). Please try it. Thanks for bringing this issue to our attention. |
@itboy87 你好,我看了一下,Maven仓库 中似乎不能找到0.1.1版本。 |
@Matcha-xiaobin it takes some time to show up there but it's already released. You can use it, just set it to |
|
@itboy87 我想我应该是弄错了,只有ksoup 需要升级到0.1.1, ksoup-network 并不需要升级,依然使用0.1.0,对吗? |
经过测试,确实没有看到错误的内容了,非常棒!感谢! |
你好,很抱歉再次打扰下,这个问题,在IOS上似乎依然存在!在Android 和jvm平台上似乎是好的。 |
@Matcha-xiaobin it appears there is an issue with the network request to your web link, |
好的,我刚刚检查了下代码,似乎是ktor这边存在一些问题,我是采用ktor获取html内容后给到ksoup解析的,但是现在失败了... 目前我改成了直接使用Ksoup.parseGetRequest(url),一切似乎都没有问题了。 |
@Matcha-xiaobin, you're correct; the issue is related to Ktor Darwin, as mentioned in this KTOR-5158. However, it seems the problem is still unresolved. I'm considering switching to CIO, which might work better. I'll conduct some testing and then make a decision. Could you please confirm if it's working fine after adding the above-mentioned code in the info.plist? |
@Matcha-xiaobin I just tried CIO, and it appears that CIO still doesn't support TLS sessions on the native platform. It is throwing the following error: |
是的,我这边也是抛出了这个错误。我之前并没有注意到这个错误,因为在jvm和android上是正常的,我就忽略ktor的问题,这是我的疏忽。 |
是的,我目前确定是可以正常工作 |
我可能说的有点误解,我重新解释下: |
@itboy87 引入0.1.1似乎会报这个错误 但暂时没有影响到我。 |
For some reason, the last publish missed this file, and also ksoup-network:0.1.1. I will fix that in the next version. |
Describe the bug
ksoup 0.1.0
解析html后多出了部分不完整的内容,当我采用get请求拿到网页内容后,我查看了一下内容,并没有错误重复的内容,但使用Ksoup.parse(htmlString)后,就出现了错误的重复内容
上图中,html内容是正确的,但是body的内容则包含重复的
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Device (please complete the following information):
android 13
ios 17
jvm
Additional context
网页结构上是这样的:
代码这么写的:
解析出来后是这样的:
我期望的正确的打印结果应该是:
TAG: mainContents: 1, titles: 6, contents: 6
The text was updated successfully, but these errors were encountered: