爬取新闻数据测试
This commit is contained in:
@@ -278,7 +278,7 @@ public class StockService {
|
|||||||
.header("Referer", "https://www.business-standard.com/")
|
.header("Referer", "https://www.business-standard.com/")
|
||||||
.header("Accept-Language", "en-US,en;q=0.9")
|
.header("Accept-Language", "en-US,en;q=0.9")
|
||||||
.get();
|
.get();
|
||||||
result = doc.html();
|
result = doc.html().substring(doc.html().indexOf(",\"articleBody\":\"" + 16), doc.html().indexOf(",\"author\""));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return ServerResponse.createByErrorMsg(e.toString());
|
return ServerResponse.createByErrorMsg(e.toString());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user