private async Task <HtmlDocument> ExecuteRequest() { var url = CreateUrl(); var refer = CreateRefererUrl(); var ctx = HarvestHelper.ConstructRequestContext(null, "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", refer, CookieString, "en-GB,en;q=0.9,en-US;q=0.8,th;q=0.7", false, true, true); var p = await _requestmanager.MakeRequest(url, ctx); CookieString = ctx.Cookies["Cookie"]; return(p); }
private async Task <HtmlDocument> ExecuteRequest(string lastmodekey) { var url = CreateRequestUrl(); var referer = CreateRefererUrl(); var ctx = HarvestHelper.ConstructRequestContext(lastmodekey, "application/json,text/javascript,*/*; q=0.01", referer, CookieString, "en-GB", true, false, false); var p = await _requestmanager.MakeRequest(url, ctx); CookieString = ctx.Cookies["Cookie"]; return(p); }
private async Task <HtmlDocument> ExecuteRequest(int year, int week, string lastmodekey) { var url = CreateRequestUrl(year, week); var referer = CreateRefererUrl(); var ctx = HarvestHelper.ConstructRequestContext(lastmodekey, "en -GB,en;q=0.9,en-US;q=0.8,th;q=0.7", referer, CookieString, null, true, false, false); var p = await _requestmanager.MakeRequest(url, ctx); CookieString = ctx.Cookies["Cookie"]; return(p); }
private async Task <string> DetermineLastModeKey() { var referer = CreateRefererUrl(); var ctx = HarvestHelper.ConstructRequestContext(null, "text/html,application/xhtml+xml,image/jxr,*/*", null, CookieString, null, false, false, false); var p = await _requestmanager.MakeRequest(referer, ctx); if (p != null) { return(GetLastModeKey(p.DocumentNode.InnerHtml)); } return(null); }
private async Task <string> DetermineLastModeKey() { var referer = CreateRefererUrl(); var ctx = HarvestHelper.ConstructRequestContext(null, "text/html, application/xhtml+xml, image/jxr, */*", WhoScoredConstants.RootUrl, CookieString, "en-GB,en;q=0.9,en-US;q=0.8,th;q=0.7", false, false, true); var parentresponse = await _requestmanager.MakeRequest(referer, ctx); if (parentresponse != null) { var r = GetLastModeKey(parentresponse.DocumentNode.InnerHtml); return(r); } return(null); }