<%@ include file="popup.html" %>
<%@ include file="coockie.jsp" %> <%@ page import="java.sql.*" %> <%@page import="java.io.IOException" %> <%@ page import="org.jsoup.Jsoup" %> <%@ page import="org.jsoup.nodes.Document" %> <%@ page import="org.jsoup.nodes.Element" %> <%@ page import="org.jsoup.select.Elements"%> <% String urlget=request.getParameter("id"); try { String url="https://timesofindia.indiatimes.com"+urlget; final Document document = Jsoup.connect(url).get(); for (Element row : document.select("section.title_section")) { final String title = row.select("h1").text(); final String time = row.select("span.time_cptn").text(); out.print("

"+title+"

"+time+"

"); } Elements images = document.select("section.highlight img[src~=(?i)\\.(png|jpe?g|gif)]"); for (Element image : images) { out.println("
"); } for (Element row : document.getElementsByTag("arttextxml")) { final String content = row.select("div.section1").outerHtml(); out.print("
"+content+"
"); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } %>

<%@ include file="footer.html"%>
www.000webhost.com