It is required to receive in the html line a code that is formed when clicking on the link https://username.imtqy.com/?action= "get"

I tried this:

string url = @"https://username.imtqy.com?action=""get"" "; string content = ""; using (var webClient = new WebClient()) { content = webClient.DownloadString(url).ToString(); } 

But in content , the string that would be there at https://username.imtqy.com . Why is this happening and how to fix it?

PS When I click on this link, js code works that adds text to the page.

  • exactly need quotes? - Stranger in the Q
  • Give a normal link that could work. - EvgeniyZ pm

2 answers 2

Probably you need Uri.EscapeUriString(String)

 Uri.EscapeUriString("https://username.imtqy.com/?action="get"") 

->

 "https://username.imtqy.com/?action=%22get%22" 

PS: you probably don’t need quotes at all

  • I removed the quotes, and I do not understand a bit why if I have C # code and you have JS. - Andrew
  • @Andrew mda, and from what I decided that you have js, however in c # there are similar methods, now I will change the answer - Stranger in the Q
  • Unfortunately, it does not work, and I accidentally kept silent about something. Now I will update the question. - Andrew

Thus, it is impossible to get html code, as it is formed in the js file. JS code of the file when requesting html code is not executed .