<%@ 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 pg=request.getParameter("p"); String urlget=request.getParameter("city"); String url; try { if(pg.equals("0")){ url="https://timesofindia.indiatimes.com/city/"+urlget;} else{url="https://timesofindia.indiatimes.com/city/"+pg;} final Document document = Jsoup.connect(url).get(); for (Element row : document.select("ul.list5 li")) { final String title = row.select("span.w_tle a").text(); final String linkss = row.select("span.w_tle a").attr("href"); final String dates = row.select("span.strlastupd").text(); if(!title.equals("")){ out.print("");} } %>
    <% for (Element row : document.select("ul.pagination li")) { final String list = row.select("li a").text(); final String ref = row.select("li a").attr("href"); out.print("
  • "+list+"
  • "); } %>
<% } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } %>
<%@ include file="footer.html"%>
www.000webhost.com