Java code to find Location of mobile number 
public class WebScraper {
    public static void main(String args[]) throws IOException {
        //String url;
        String mobileNumber = "9566171277";
        String url ="http://trace.bharatiyamobile.com/?numb="+mobileNumber;
        Document doc = Jsoup.connect(url).get();
         Elements links = doc.select("span.bluetext");
        // Elements media = doc.select("[src]");
        // Element imports = doc.select("div.eachStory").first();
        //Elements resultLinks = doc.select("table>tbody>tr");

        // PrintWriter out = new PrintWriter(new BufferedWriter(new
        // FileWriter("Data.txt", true)));
        for (int i = 0; i < links.size(); i++) {
            System.out.println(links.get(i).text());
            // out.println(resultLinks.get(i));
        }

    }
}
String ua = "Mozilla/5.0 ;Windows NT 6.1; "
     + "WOW64; AppleWebKit/537.36 ;KHTML, like Gecko; "
     + "Chrome/39.0.2171.95 Safari/537.36";
Document doc = Jsoup.connect(url)
        .userAgent(ua)
        .get();
Elements links = doc.select("span.bluetext");

Comments

Popular posts from this blog

How whatsapp works

Android N Developer Preview? It's exciting for most of you