[英]how to use OR operation in jsoup?
Elements nextLinks = doc.select(a[href*=https] || a[href*=http]);
I need to connect HTTP as well as HTTPS site. 我需要连接HTTP以及HTTPS站点。 How can I do this?
我怎样才能做到这一点?
Use the ,
comma separator for that 使用
,
逗号分隔符
The following should do 以下应该做的
Elements nextLinks = doc.select("a[href*=https] , a[href*=http]");
Take a look at this: Selector syntax and this: Use selector-syntax to find elements 看一下: 选择器语法和此: 使用选择器语法查找元素
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.