I’m taking an online class with Google’s Apex system, and would like to be able to automatically save the data from certain pages. The process of logging in and getting to the content when browsing normally is as follows: open the webapp and login, navigate the course I want to view, click the course. When I click the course I want to work on, it opens a new window with the lessons. This is the part I haven’t been able to do with a program.
The first way I thought of was with PHP, to request the web pages and simply save them. The problem is that there is a login, and a number of javascript events and things that I don’t know how to automate with php. I got as far as logging in with a POST request, but couldn’t figure the rest out.
Today I was trying to do it with Windows Forms, C#, using the dotnet WebBrowser control. I have it log in for me and navigate to the page where I need to choose the course to open, but if I click the link, it attempts to open the webpage in Internet Explorer. If I use the link it opens, I get an error from the site.
Inspecting the link on the page I’m having trouble with, I found the javascript event that opens the new window. It opens it with a redirect link. Using this redirect link in a new tab instead of new window works in Chrome, but I don’t know how to get the redirect link from C#. The a element is inside an iframe, and I have to get the link there. How can I, in C#, retrieve an element from within an iframe?
Also, is there a better way to do this?
Use WebClient class for getting html of url.
Example 1:
// Get Images from page… it is faulty right now due to my modifications…
i am working on it, but help you get your target..
Example from WebClient Class link: