I want to automatically get content from a web page which is the frontend for a database.
The page contains a list of schools in a certain area. Each name is a hyperlink. I want to get all the details for each school, but those are only available by a javascript which then opens a popup window with the necessary information in a html table.
The database frontend is here: http://www.kultusportal-bw.de/,Lde/Startseite/schulebw/Schuladressen
If I just click enter in the (empty) search text box, I get a result like that:
If then I click on the first link "Aach, Grund- und Hauptschule", the java script opens the popup-window with the address details like that:
The hyperlink itself is only called "javascript:ShowDetails('04146900')", so it does not lead to a separate page but executes some script (which unfortunately exceeds my knowledge.) I'd like to automatically copy the name of the hyperlink together with the html content of this popup into a text or html file for all the hyperlinks. How could I do that?
I tried to see what happens with LIVE HTTP Headers in Firefox, and when I click on the link, I get the following result:
https://stewi.kultus-bw.de/didsuche/DienststellenSucheWebService.asmx/GetDienststelle
POST /didsuche/DienststellenSucheWebService.asmx/GetDienststelle HTTP/1.1
Host: stewi.kultus-bw.de
User-Agent: (...)
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/json; charset=utf-8
X-Requested-With: XMLHttpRequest
Referer: https://stewi.kultus-bw.de/didsuche/
Content-Length: 20
Cookie: ASP.NET_SessionId=3ly0zyatmod1tqoe2sbwwe0p
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
{'disch':'04146900'}
HTTP/1.1 200 OK
Cache-Control: private, max-age=0
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Sun, 05 Jan 2014 11:07:20 GMT
Content-Length: 651
I tried to "simulate" the click on the hyperlink by composing a link like **https://stewi.kultus-bw.de/POST/didsuche/DienststellenSucheWebService.asmx/GetDienststelle{'disch':'04146900'} ** but that does not work.