I am trying to build a VB.NET 2005 windows app which gets cars info from a webpage(webapplication) that has a username and password.
I was able to programmatically login to this webpage(by automatically populating the input boxes using webbrowser control) And after I logged in, I could view the cars data in browser and I did "View Source" but the cars data (such as car model, brand, color etc..) were not viewable in the page source code. So how can I read these data with my application?
I hope my question was clear and literally need some help.

The data did not appear in source code at all so I had to install a firefox addon called "Web developer"
and I clicked "View generated source code" and I could see the data there.
In my case the cars data are being shown in a dynamic table, 1 row adds up as soon as a new car comes.
Here is 1 row of data:

<td class="x-grid3-col x-grid3-cell x-grid3-td-dealer x-grid3-cell-first " style="width: 78px;" tabindex="0"><div class="x-grid3-cell-inner x-grid3-col-dealer" unselectable="on">Privat</div></td><td class="x-grid3-col x-grid3-cell x-grid3-td-manufacturer " style="width: 98px;" tabindex="0"><div class="x-grid3-cell-inner x-grid3-col-manufacturer" unselectable="on">AUDI</div></td><td class="x-grid3-col x-grid3-cell x-grid3-td-modelDescription " style="width: 157px;" tabindex="0"><div class="x-grid3-cell-inner x-grid3-col-modelDescription" unselectable="on">A2 1.4 </div></td><td class="x-grid3-col x-grid3-cell x-grid3-td-price " style="width: 88px; text-align: right;" tabindex="0"><div class="x-grid3-cell-inner x-grid3-col-price" unselectable="on"><span class="format-right">7.000</span></div></td><td class="x-grid3-col x-grid3-cell x-grid3-td-firstRegistration " style="width: 58px;" tabindex="0"><div class="x-grid3-cell-inner x-grid3-col-firstRegistration" unselectable="on">6/2000</div></td><td class="x-grid3-col x-grid3-cell x-grid3-td-mileage " style="width: 73px;" tabindex="0"><div class="x-grid3-cell-inner x-grid3-col-mileage" unselectable="on"><span class="format-right">122.000</span></div></td><td class="x-grid3-col x-grid3-cell x-grid3-td-powerInKw " style="width: 48px;" tabindex="0"><div class="x-grid3-cell-inner x-grid3-col-powerInKw" unselectable="on"><span class="format-right">55</span></div></td><td class="x-grid3-col x-grid3-cell x-grid3-td-modificationDate " style="width: 98px;" tabindex="0"><div class="x-grid3-cell-inner x-grid3-col-modificationDate" unselectable="on"><span class="format-right">Heute - 21:29</span></div></td><td class="x-grid3-col x-grid3-cell x-grid3-td-location " style="width: 98px;" tabindex="0"><div class="x-grid3-cell-inner x-grid3-col-location" unselectable="on">85256 Vierkirchen</div></td>

few of values which i want to grap are 'AUDI', 7.000, "85256 Vierkirchen"
So far I coudn't grab these values using my code... So I thought of a new solution, I installed another ffox addon called "firebug" and checked how the data is coming and found out it's REVERSE Ajax DWR requests and responses.
I monitored these requests, and I noticed that every 1 minute, a request/response comes via POST and all these responses have the size of 90 bytes. But then I saw a response with a bigger size(about 648 bytes) I quickly checked the table in website, and YES a new car was there.

Since I had no idea about what reverse ajax dwr is, i googled a bit and found out that this website is using the polling method for pushing data every 1 minute from server to browser.
So to make this short, the data is coming from website to my browser every 1 minute, here is the response Body which I saw in firebug:


adQueueListener.addNewAd({adId:124725772,category:'Limousine',changeInfo:{adId:124725772,adVersion:24,changeEventId:457859860,changeSubtype:['DESCRIPTION'],changeType:'Update',comment:"DESCRIPTION",creationTime:1262659849452,modificationTime:new Date(1262659849000),objectType:"AD"},city:"hanau",climatisation:'AUTOMATIC_CLIMATISATION',color:'BEIGE',commercial:false,consumerGrossPrice:4200.00,creationDate:new Date(1260208837000),dealer:false,dealerGrossPrice:null,doorCount:'FOUR_OR_FIVE',firstRegistration:new Date(788914800000),fuel:'PETROL',machtedFilterNames:["Mercedes"],makeName:"MERCEDES-BENZ",manufacturerColorName:"",metallic:false,mileage:149000,modelDescription:"C 180 Elegance",modificationDate:new Date(1262659849000),numSeats:5,powerInKw:90,powerInPs:122,priceDecrease:false,sellerId:2467966,transmission:'AUTOMATIC_GEAR',vehicleCategory:null,version:24,zipcode:"63450"});

The response location(ajax script location) is http://gb-ticker.mobile.de/ticker/dwr/call/plainpoll/ReverseAjax.dwr The data I want are in the adQueueListener.addNewAd method. So how to get these data from this ajax function?

Please let me know whether it can be done by parsing the html code or the ajax requests.
I will be pleased if you can shed some lights.
Many thanks

Edited 6 Years Ago by __avd: Added [code] tags. Encase your code in: [code] and [/code] tags.

This article has been dead for over six months. Start a new discussion instead.