S
S
SuperHamster2015-12-21 02:02:46
C++ / C#
SuperHamster, 2015-12-21 02:02:46

C++ and interaction with web pages, what do you recommend?

I decided to write a program (In C++, maybe later on Qt) to interact with the sites I need, for example, to log in, find the necessary information on the page, copy-paste it to a file / display it in the program window. Automate all this as much as possible. I've never dealt with this and don't even know where to start. I tried to google, but I found too much ambiguous unstructured information, but I would like to comprehend this matter gradually, with a full understanding of "what's what and why." Can you recommend any books/lessons/articles?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
asd111, 2015-12-21
@SuperHamster

I don't know why C++ is here.
I advise you to do it in Python.
Python has a lot of handy tools for this.
For example requests or selenium web driver (in case there are a lot of javascript elements).
If you strictly want C++, then see libcurl , Qt uses QNetworkAccessManager

I
Ivan, 2015-12-21
@LiguidCool

And they say it’s convenient to hammer nails with a microscope.

K
kezel, 2015-12-21
@kezel

dig into the sockets ... -there you
establish a connection with the server socket
-send a request on the socket like you are a browser (there you can on behalf of anyone)
- and those in response are a buffer full of html content.
One nuance, pictures and icons are obtained by separate requests.
Here the browser does not take long to write your own

J
Jacob E, 2015-12-21
@Zifix

It's easy, even the example is standard for parsing HTML. To send requests, you can take the code from here .

J
jackroll, 2015-12-21
@jackroll

Boost.Asio, libcurl, ACE , Winsock2, wvstreams , C++ Network Library

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question