Multithreading Program in Java with online shop scrap Example

Multithreading Program in Java with online shop scrap Example

Multithreading Program in Java with online shop scrap Example: Multithreading is a process of executing multiple threads at a time. In our below example, we are sending the book ISBN number to 3 different online shops to scrap and get the price details. Final scrapped price details are written as JSON data. We have implemented multithreading in the below program

213 total views, 1 views today

» Read more

PNR Live Status using Java

PNR Live Status Java Code

When I wanted to get the PNR(Passenger Name Record) status programmatically, it can be done only using third party API’s. But none of the third party API’s are free and even if it is free then number of pnr status per day is limited. So I googled for java code to get the PNR status. I could able to see many

780 total views, 1 views today

» Read more

AsyncTask with Broadcast Receiver in Android – Tutorial and Example

AsyncTask with Broadcast Receiver in Android: What we are going to do ? We are going to see an example for AsyncTask in Android with Broadcastreceiver. In our example we will be fetching the operator and circle information for the received new SMS sender phone number. What is AsyncTask & BroadcastReceiver? AsyncTask: [sociallocker] AsyncTask is basically to do a aynchronous

898 total views, 4 views today

» Read more

PDF Scrapping in Java Sample code

PDF Scrapping: We may needed to scrap the pdf using java. This involves parsing tables and different areas of pdf. How can we proceed ? We can proceed this way, 1. Converting pdf to html/xml 2. Parsing the converted html/xml using the Jsoup open source Jar (Jsoup-1.7.2). Converting pdf to html: To convert pdf to html we can use pdfbox

312 total views, no views today

» Read more

Parsing Flipkart using Java

Hi webscrappers, Herewith I have given the example working java code to parse flipkart and take the price of the given book (isbn). I have used Jsoup library. you can download from here, Jar Download: Jsoup Jar Java Program: package in.javadomain; import java.io.IOException; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; public class FlipkartBookPrice { public static void main(String[] args) throws IOException { String

391 total views, no views today

» Read more

Free Mobile Price Comparison API by Javadomain.in

Hello All, As Requested by our blog readers/followers/subscribers/members/users Javadomain finally released Mobile Price Comparison API. Sample Program: Add jsoup-1.7.2.jar and the above downloaded mobilepricecompare.jar to your build path. package in.javadomain; import in.javadomain.Compare; public class MobilePrice { public static void main(String[] args) { Compare c = new Compare(); System.out.println(c.mobileComparedPrice(“nokia lumia 520”)); } } Output: ebay – Rs.6430 amazon – Rs.8015 flipkart – Rs.8149 homeshop18

253 total views, 2 views today

» Read more

Jsoup Tutorials

1. Introduction 2. Input    2.a From String    2.b From URL    2.c From File 3. Parsing Data    3.1 parsing element by id    3.2 parsing element by tag    3.3 parsing element by class    3.4 parsing element by attributes    3.5 parsing sibling elements    3.6 parsing parent and children elements 4. Selectors    4.1 find elements

236 total views, no views today

» Read more

Train Route Java Program

Now you can get the train route information by simply inputting train number to the below program, Requirement: Jsoup jar Train Route Java Program: package in.javadomain; import java.io.IOException; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; public class TrainRoute { public static void main(String[] args) { TrainRoute tr = new TrainRoute(); System.out.println(tr.getTrainSchedule("12635")); } private String getTrainSchedule(String trainNumber) { String trainRoute = null; String trainUrl

322 total views, 1 views today

» Read more

Domain availability Java program

Requirement: Register in the Freedomainapi.com for api key, of course its free. Once you got the apikey replace in the below program and run. Requied Jar file: Java Json Jar Domain Availability Java program: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import org.json.JSONException; import org.json.JSONObject; public class DomainCheck { public static void main(String[] args) { DomainCheck dc

131 total views, no views today

» Read more
1 2 3