[opensuse-programming] Contact users.opensuse.org and read a picture

Hi I am recently writing an application for the openSUSE Weekly News Team with Qt C++ which should get the statistics and so on. 1.: It downloads the http://lists.opensuse.org/stats/general/general-mlmmj_subcount-day.png picture, but I don't know how to read out the text. Jan (dl9pf) made a Python script which reads out the text, but I don't know how to manage it with C++. I know I could introduce the python script, but I think that isn't the nicest way to do it. 2.: It should download the source from the https://users.opensuse.org site, to read out the statistics (how many users etc), but I just get: <HTML><HEAD><TITLE>Novell iChain</TITLE></HEAD><BODY><b><p>Your old browser does not support a 302 Redirect.</b></BODY></HTML> How can I avoid that? 3.: Probably the hardest question. How can I login myself through the program on opensuse.org and to upload the translated news to the weekly news site (I thought about the QHttpHeader, but I am not sure if it would work). ---------- mfg / best Sebastian Schöbinger //Member of the openSUSE Team // //Writer of the openSUSE News (Tips and Tricks) // //Translator of the openSUSE News // //http://de.opensuse.org/Benutzer:STS301 // //http://linux301.wordpress.com // Public openPGP key: 4C5E 2C32 7F1B 574C 0746 2DB1 724B E45F 1FC7 93A4

Sebastian Schöbinger wrote:
It downloads the http://lists.opensuse.org/stats/general/general-mlmmj_subcount-day.png picture, but I don't know how to read out the text. Jan (dl9pf) made a Python script which reads out the text, but I don't know how to manage it with C++. I know I could introduce the python script, but I think that isn't the nicest way to do it.
The whole thing is run by munin, so maybe that's where you need to look for a raw data interface.
It should download the source from the https://users.opensuse.org site, to read out the statistics (how many users etc), but I just get:
<HTML><HEAD><TITLE>Novell iChain</TITLE></HEAD><BODY><b><p>Your old browser does not support a 302 Redirect.</b></BODY></HTML>
How can I avoid that?
I don't think you can - your code needs to understand HTTP. /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org

Sebastian Schöbinger wrote:
It downloads the http://lists.opensuse.org/stats/general/general-mlmmj_subcount-day.png picture, but I don't know how to read out the text. Jan (dl9pf) made a Python script which reads out the text, but I don't know how to manage it with C++. I know I could introduce the python script, but I think that isn't the nicest way to do it.
The whole thing is run by munin, so maybe that's where you need to look for a raw data interface.
ok, where is munin??
It should download the source from the https://users.opensuse.org site, to read out the statistics (how many users etc), but I just get:
<HTML><HEAD><TITLE>Novell iChain</TITLE></HEAD><BODY><b><p>Your old browser does not support a 302 Redirect.</b></BODY></HTML>
How can I avoid that?
I don't think you can - your code needs to understand HTTP.
How needs to understand HTTP, you mean the application should respond on a request of ichain, let's see if it works with QHttpRequest.
/Per Jessen, Zürich
mfg / best Sebastian Schöbinger //Member of the openSUSE Team // //Writer of the openSUSE News (Tips and Tricks) // //Translator of the openSUSE News // //http://de.opensuse.org/Benutzer:STS301 // //http://linux301.wordpress.com // -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org

Sebastian Schöbinger wrote:
Sebastian Schöbinger wrote:
It downloads the
http://lists.opensuse.org/stats/general/general-mlmmj_subcount-day.png
picture, but I don't know how to read out the text. Jan (dl9pf) made a Python script which reads out the text, but I don't know how to manage it with C++. I know I could introduce the python script, but I think that isn't the nicest way to do it.
The whole thing is run by munin, so maybe that's where you need to look for a raw data interface.
ok, where is munin??
Sorry, I don't kow where to look. (other than http://munin.projects.linpro.no, but I'm sure that's not what you meant :-)
It should download the source from the https://users.opensuse.org site, to read out the statistics (how many users etc), but I just get:
<HTML><HEAD><TITLE>Novell iChain</TITLE></HEAD><BODY><b><p>Your old browser does not support a 302 Redirect.</b></BODY></HTML>
How can I avoid that?
I don't think you can - your code needs to understand HTTP.
How needs to understand HTTP, you mean the application should respond on a request of ichain, let's see if it works with QHttpRequest.
I don't know your code of course, but it just needs to know how to interpret the headers sent by the http server. /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org

Sebastian Schöbinger wrote:
Sebastian Schöbinger wrote:
It downloads the
http://lists.opensuse.org/stats/general/general-mlmmj_subcount-day.png
picture, but I don't know how to read out the text. Jan (dl9pf) made a Python script which reads out the text, but I don't know how to manage it with C++. I know I could introduce the python script, but I think that isn't the nicest way to do it.
The whole thing is run by munin, so maybe that's where you need to look for a raw data interface.
ok, where is munin??
Sorry, I don't kow where to look. (other than http://munin.projects.linpro.no, but I'm sure that's not what you meant :-)
right, it is definitly not what I meant, but Henne vogelsang manages it now, that the statistics are also availible as a text file, so it will be no problem now to read out the picture, but thanks.
It should download the source from the https://users.opensuse.org site, to read out the statistics (how many users etc), but I just get:
<HTML><HEAD><TITLE>Novell iChain</TITLE></HEAD><BODY><b><p>Your old browser does not support a 302 Redirect.</b></BODY></HTML>
How can I avoid that?
I don't think you can - your code needs to understand HTTP.
How needs to understand HTTP, you mean the application should respond on a request of ichain, let's see if it works with QHttpRequest.
I don't know your code of course, but it just needs to know how to interpret the headers sent by the http server.
yes, now I am working on that to get it work. ---------- mfg / best Sebastian Schöbinger //Member of the openSUSE Team // //Writer of the openSUSE News (Tips and Tricks) // //Translator of the openSUSE News // //http://de.opensuse.org/Benutzer:STS301 // //http://linux301.wordpress.com //

On Mon, 29 Jun 2009, Per Jessen wrote:-
Sebastian Schöbinger wrote:
It should download the source from the https://users.opensuse.org site, to read out the statistics (how many users etc), but I just get:
<HTML><HEAD><TITLE>Novell iChain</TITLE></HEAD><BODY><b><p>Your old browser does not support a 302 Redirect.</b></BODY></HTML>
How can I avoid that?
I don't think you can - your code needs to understand HTTP.
I'm curious as to why he's getting a 302 redirect when using curl gets the front page, as shown by this snippet: davjam@playing:~> curl -x '' https://users.opensuse.org <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>openSUSE User Directory</title> Regards, David Bolt -- Team Acorn: http://www.distributed.net/ OGR-NG @ ~100Mnodes RC5-72 @ ~1Mkeys/s openSUSE 10.3 32b | openSUSE 11.0 32b | | openSUSE 10.3 64b | openSUSE 11.0 64b | openSUSE 11.1 64b | RISC OS 3.6 | RISC OS 3.11 | openSUSE 11.1 PPC | TOS 4.02 -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org

On Mon, 29 Jun 2009, Per Jessen wrote:-
Sebastian Schöbinger wrote:
It should download the source from the https://users.opensuse.org site, to read out the statistics (how many users etc), but I just get:
<HTML><HEAD><TITLE>Novell iChain</TITLE></HEAD><BODY><b><p>Your old browser does not support a 302 Redirect.</b></BODY></HTML>
How can I avoid that?
I don't think you can - your code needs to understand HTTP.
I'm curious as to why he's getting a 302 redirect when using curl gets the front page, as shown by this snippet:
davjam@playing:~> curl -x '' https://users.opensuse.org
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>openSUSE User Directory</title>
Regards, David Bolt yes I know, with wget it did also work, now I tried with a Qt download example and it worked, so I will look how the did it.
mfg / best Sebastian Schöbinger //Member of the openSUSE Team // //Writer of the openSUSE News (Tips and Tricks) // //Translator of the openSUSE News // //http://de.opensuse.org/Benutzer:STS301 // //http://linux301.wordpress.com // Public openPGP key: 4C5E 2C32 7F1B 574C 0746 2DB1 724B E45F 1FC7 93A4 -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
participants (3)
-
David Bolt
-
Per Jessen
-
Sebastian Schöbinger