-
Notifications
You must be signed in to change notification settings - Fork 7
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
写了几个插件,但都遇到些问题。 #12
Comments
感谢贡献,三个插件具体问题我晚点再回答。 至于这个自定义Page传递参数,我晚上回去更新一下API,之前其实预留了一些地方支持但是几个插件没用到就忘了 |
好的,谢谢,大多都是美观的问题,并不急,什么时候看都可以。 |
已经在测试版更新对自定义参数的支持(ICustomPageDataComponent::initPage),你可以在测试版先试试,记得更新api |
自定义参数已经实现,不过感觉函数的调用的顺序不太舒服,我是通过迭代实现的,现在为 : 顺便问一下:很多网站在搜索的时候会需要验证码,能解决么?我这样尝试了一下,但不行: override suspend fun getSearchData(keyWord: String, page: Int): List<BaseData> {
val searchResultList = mutableListOf<BaseData>()
val url = "${host}/search/${keyWord}----------${page}---.html"
Log.e("TAG", url)
val document = JsoupUtil.getDocument(url)
Log.e("TAG", "$document")
if (document.select("title").text() == "系统安全验证"){
CookieManager.getInstance().setCookie(host, "")
WebBrowserAction.obtain(url,
loadPolicy = object :
WebUtil.LoadPolicy by WebUtil.DefaultLoadPolicy {
override val userAgentString = Const.ua
}).go(AppUtil.appContext)
throw RuntimeException("请在验证结束后点击左上角返回,然后下拉刷新")
}
searchResultList.addAll(ParseHtmlUtil.parseSearchEm(document, url))
return searchResultList
} |
之前没有电脑仔细看代码,现在已经修正调用时机了,可以下载测试版看看。 关于验证码,目前暂时还没有提供相应工具一键解决,后面新版出来再处理一下 |
另外你写的几个插件,有比较完善的都可以先提交上来了 |
ok👌 |
一些网站,通过 JsoupUtil.getDocument(url) 得到的数据是不全的。我想要延迟两秒再获取网页内容,有什么办法么? |
看看WebUtil,可以直接获取动态网页源码,樱花2用的就很多 |
链接:
顺便问一下,如果需要携带一个 String 参数到新的页面,该如何做?
https://github.com/feiyeyuanye/AnFunsAnimePlugin/blob/main/app/src/main/java/com/jhr/anfunsanimeplugin/plugin/components/TopicPageDataComponent.kt
The text was updated successfully, but these errors were encountered: