使用Java在网页上查找链接 [英] Finding Links on a Webpage with Java

查看:116
本文介绍了使用Java在网页上查找链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Java将网页的源代码存储在字符串中.我想提取源代码中的所有URL并将其输出.我对正则表达式之类的东西不满意,甚至不知道该如何处理.任何帮助将不胜感激.

Using Java have the source code of a webpage stored in a string. I want to extract all the urls in the source code and output them. I am awful with regex and the like and have no idea how to even approach this. Any help would be greatly appreciated.

推荐答案

解析器,如

这篇关于使用Java在网页上查找链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆