Fixi the SeekingAlpha Headlines feed
This commit is contained in:
@@ -1648,6 +1648,7 @@ namespace MarketData.Helper
|
||||
/// <summary>
|
||||
/// Retrieves headlines from seeking alpha. If ignoreMarketDate is TRUE then the results will not be
|
||||
/// filtered by the current market date .
|
||||
/// If this feed fails then it may be necessary to update the cookie data. I recently added the session_id cookie after a failure
|
||||
/// </summary>
|
||||
/// <param name="symbol"></param>
|
||||
/// <param name="ignoreMarketDate"></param>
|
||||
@@ -1682,22 +1683,17 @@ namespace MarketData.Helper
|
||||
lastVisitedPage.Append("%7B%22pathname%22%3A%22https%3A%2F%2Fseekingalpha.com%2Fsymbol%2F");
|
||||
lastVisitedPage.Append(symbol);
|
||||
lastVisitedPage.Append("%2Fnews%22%2C%22pageKey%22%3A%22947f55ae-51ad-480f-9f22-54ef1d5904d1%22%7D");
|
||||
|
||||
cookieCollection.Add(new Cookie("LAST_VISITED_PAGE", lastVisitedPage.ToString()) { Domain = domain });
|
||||
cookieCollection.Add(new Cookie("_ga", "GA1.1.1862228764.1739274352") { Domain = domain });
|
||||
cookieCollection.Add(new Cookie("_ga_KGRFF2R2C5","GS1.1.1739274352.1.1.1739274637.60.0.0"){ Domain = domain });
|
||||
cookieCollection.Add(new Cookie("_gcl_au","1.1.1611738349.1739274352"){ Domain = domain });
|
||||
cookieCollection.Add(new Cookie("_pxvid","bfabea2f-e86d-11ef-832d-24c9f227f821"){ Domain = domain });
|
||||
cookieCollection.Add(new Cookie("_ga", "GA1.1.561570036.1762275562") { Domain = domain });
|
||||
cookieCollection.Add(new Cookie("_ga_KGRFF2R2C5","GS2.1.s1762281227$o2$g1$t1762281245$j42$l0$h0"){ Domain = domain });
|
||||
cookieCollection.Add(new Cookie("_gcl_au","1.1.153815328.1762275562"){ Domain = domain });
|
||||
cookieCollection.Add(new Cookie("_pxvid","974e14d5-b99f-11f0-a87f-9f37e24a2165"){ Domain = domain });
|
||||
cookieCollection.Add(new Cookie("_sasource",""){ Domain = domain });
|
||||
cookieCollection.Add(new Cookie("pxcts","bfabfefc-e86d-11ef-832f-7d1e5f897eb5"){ Domain = domain });
|
||||
cookieCollection.Add(new Cookie("pxcts", "974e2072-b99f-11f0-a881-8ccc46784a0f") { Domain = domain });
|
||||
cookieCollection.Add(new Cookie("session_id", "15023729-4bd9-421f-8721-e849f65fb8b6") { Domain = domain });
|
||||
|
||||
#endregion
|
||||
sb.Append("https://").Append(domain).Append("/api/v3/symbols/").Append(symbol).Append("/news?filter[since]=");
|
||||
sb.Append("0");
|
||||
sb.Append("&filter[until]=");
|
||||
sb.Append("0");
|
||||
sb.Append("&id=").Append(symbol);
|
||||
sb.Append("&include=author,primaryTickers,secondaryTickers,sentiments,otherTags&isMounting=true&page[size]=40&page[number]=1");
|
||||
sb.Append("https://seekingalpha.com/symbol/").Append(symbol).Append("/news");
|
||||
strRequest = sb.ToString();
|
||||
MDTrace.WriteLine(LogLevel.DEBUG, strRequest);
|
||||
|
||||
@@ -1705,7 +1701,7 @@ namespace MarketData.Helper
|
||||
|
||||
if(!httpNetResponse.Success)
|
||||
{
|
||||
MDTrace.WriteLine(LogLevel.DEBUG,String.Format("Request:{0} failed with status {1}",httpNetResponse.Request,httpNetResponse.StatusCode));
|
||||
MDTrace.WriteLine(LogLevel.DEBUG, String.Format("Request:{0} failed with status {1}", httpNetResponse.Request, httpNetResponse.StatusCode));
|
||||
return null;
|
||||
}
|
||||
byte[] streamBytes = Encoding.ASCII.GetBytes(httpNetResponse.ResponseString);
|
||||
|
||||
Reference in New Issue
Block a user