Htmlagilitypack after login to Https Website with HttpWebRequest?
$10-30 USD
Closed
Posted almost 8 years ago
$10-30 USD
Paid on delivery
I want to parse some html site like pluralsight,Forexample ([login to view URL]), So How can I first login site programmaticaly (without using webbrowser control) then call another url (for example : [login to view URL]) and get response and parse with Htmlagility pack.
But I've written a login code, but I do not know the next step.
public class Login
{
private CookieContainer Cookies = new CookieContainer();
public void SiteLogin(string username, string password)
{
Uri site = new Uri("[login to view URL]");
HttpWebRequest wr = (HttpWebRequest)[login to view URL](site);
[login to view URL] = "Post";
[login to view URL] = "application/x-www-form-urlencoded";
[login to view URL] = "[login to view URL]";
[login to view URL] = Cookies;
var parameters = new Dictionary<string, string>{
{"realm", "vzw"},
{"goto",""},
{"gotoOnFail",""},
{"gx_charset", "UTF-8"},
{"rememberUserNameCheckBoxExists","Y"},
{"IDToken1", username},
{"IDToken2", password}
};
string input = [login to view URL];
using (var requestStream = [login to view URL]())
using (var writer = new StreamWriter(requestStream, [login to view URL]))
[login to view URL](ParamsToFormEncoded(parameters));
using (var response = (HttpWebResponse)[login to view URL]())
{
if ([login to view URL] == [login to view URL])
{
//but I do not know the next step.
}
}
}
private string ParamsToFormEncoded(Dictionary<string, string> parameters)
{
return [login to view URL]("&", [login to view URL](kvp => [login to view URL]([login to view URL]).Replace("%20", "+")
+ "=" + [login to view URL]([login to view URL]).Replace("20%", "+")
).ToArray());
}
}
Attach a file I wrote a code to log in
Hello.
I take an interest in Web Scraping.
I have full skills in Web scraping, Android, Iphone, Reverse engineering, Qt, c++ & c# programming.
Please check my profile and portfolio.
I have to check details of your requirement but I'll try to complete the task as fast as I can.
I'd be happy to keep long partnership,if you'd like.
Looking forward for your kind answer.
Best Regards.
Hello i can help you on this. My normal jobs is made auto-bot base on C#. I will help you detect login or not and build a class so you can re-use in next time. Thank you !
Hello,
I hope you doing very well!
I have gone through the description and would like to provide a quality solution using my 5+ years of professional experience in required skills. (.NET/ASP.NET - MVC, EF, SQL, C#).
Awaiting for your positive response so we can have final talk and start project immediately :)
Hello ,
I have the required skills to do you job perfect and immediately start
i have strong knowledge with web development since 2007 using .net ,wpf, sql and MVC ready to start working now
, let me know if you want to have more data
thanks
Greetings !!
Myself Richa Miglani and I have more than 5+ year experience in Asp.Net.
I read your job description and understand that you are looking good developer who has good experience in .Net Project
I have good experience in Asp.Net with C# and Vb.Net,Entity framework,MVC,LINQ,SQL Server 2008, Web Service, Window Service able to self start this project and will provide you quick and fast response.
My priority is customer satisfaction. I am open for further discussion.
for more information please visit my profile and check clients feedback.
Hope to hear from you soon...
Warm regards,
Bright Infotech.