Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想设计/创建一个抓取网页上数据的 API(网页链接将作为输入提供)并以 JSON/xml 格式返回数据。
我正在寻求一些帮助,以便我可以开始寻找特定的方向。
问题不是很清楚,但是如果您只想解析输入的 HTML 页面并从中获取外链,您可以执行以下操作
一般来说,当您说爬行时,它应该涉及多个页面,在一个图表中,您可以使用这些链接从一个页面移动到另一个页面。所以抓取特定页面是不正确的。