jsoup |打印空白结果|我通过了标题

时间:2018-05-03 12:42:05

标签: jsoup

我得到空白结果| println(doc.text()); //打印空标签,即标题

import org.jsoup.nodes.Document; import org.jsoup.Jsoup; import org.jsoup.Connection; import java.io.IOException; public class getText { public static void main(String args[]) throws IOException { String url = "https://www.purina.ru/"; Connection connection = Jsoup.connect(url).userAgent("Mozilla/5.0"); //Also tried full userAgent like userAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36"); Document doc = connection.get(); System.out.println(doc.text()); //doc.text print a Blank results } } //打印空白结果

this.filteredData = [
    {'id': 1, 'date': '04-05-2018'},
    {'id': 2, 'date': '29-03-2018'},
    {'id': 3, 'date': '03-04-2018'},
    {'id': 4, 'date': '24-07-2018'},
    {'id': 5, 'date': '19-08-2018'},
    {'id': 6, 'date': '13-09-2018'},
]

0 个答案:

没有答案