lundi 18 avril 2016

I'm scraping data from a website for an app and i'm trying to store that data in a SQLite Database- JSoup + Android

I'm using android studio and jsoup to scrape data from a website and display on my phone. I want the scraped data to be stored in a SQLite database in android. However when i follow the tutorials (like http://ift.tt/1e3HL0t) i always get stuck in the one spot. This is were the tutorials are are losing me. I try to add in Text but i cant get past the errors.

    db.addContact(new Contact("Ravi", "9100000000"));        
    db.addContact(new Contact("Srinivas", "9199999999"));
    db.addContact(new Contact("Tommy", "9522222222")); 

The varible String text is the data that i want to be stored in a database. Does anyone have any idea on how to store this type of data in a SQLite Database?

 String text = doc.select("#post-15 > div > table:nth-child(6) > tbody > tr:nth-child(2) > td:nth-child(2) > table:not(:last-of-type)").text();

Aucun commentaire:

Enregistrer un commentaire