Fix GetRatingsTableOnMarketBeat
This commit is contained in:
@@ -8,7 +8,7 @@ namespace IPMonitor
|
||||
static void Main(string[] args)
|
||||
{
|
||||
IConfigurationBuilder builder = new ConfigurationBuilder()
|
||||
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
|
||||
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: false);
|
||||
IConfigurationRoot configurationRoot = builder.Build();
|
||||
Arguments arguments = new Arguments(args);
|
||||
IServiceCollection services = new ServiceCollection();
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace MarketData
|
||||
static void Main(string[] args)
|
||||
{
|
||||
IConfigurationBuilder builder = new ConfigurationBuilder()
|
||||
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
|
||||
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: false);
|
||||
IConfigurationRoot configurationRoot = builder.Build();
|
||||
Arguments arguments = new Arguments(args);
|
||||
IServiceCollection services = new ServiceCollection();
|
||||
|
||||
@@ -792,6 +792,13 @@ namespace MarketData.Helper
|
||||
return sections[0];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method looks for the ratings rating in the html from the MarketBeat query
|
||||
/// I made a change to the url on 11/4/2025 changed /price-target to /forecast
|
||||
/// </summary>
|
||||
/// <param name="symbol"></param>
|
||||
/// <param name="exchange"></param>
|
||||
/// <returns></returns>
|
||||
private static HtmlNodeCollection GetRatingsTableOnMarketBeat(String symbol,String exchange)
|
||||
{
|
||||
MemoryStream memoryStream=null;
|
||||
@@ -801,7 +808,7 @@ namespace MarketData.Helper
|
||||
{
|
||||
String strRequest=null;
|
||||
StringBuilder sb=new StringBuilder();
|
||||
sb.Append("https://www.marketbeat.com/stocks/").Append(exchange).Append("/").Append(symbol).Append("/price-target");
|
||||
sb.Append("https://www.marketbeat.com/stocks/").Append(exchange).Append("/").Append(symbol).Append("/forecast");
|
||||
strRequest=sb.ToString();
|
||||
MDTrace.WriteLine(LogLevel.DEBUG,strRequest);
|
||||
httpNetResponse = HttpNetRequest.GetRequestNoEncodingV3(strRequest, "www.marketbeat.com");
|
||||
|
||||
@@ -20,7 +20,7 @@ public class MarketDataUnitTestClass
|
||||
|
||||
public MarketDataUnitTestClass()
|
||||
{
|
||||
builder = new ConfigurationBuilder().AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
|
||||
builder = new ConfigurationBuilder().AddJsonFile("appsettings.json", optional: true, reloadOnChange: false);
|
||||
IConfigurationRoot configurationRoot = builder.Build();
|
||||
configuration = configurationRoot;
|
||||
GlobalConfig.Instance.Configuration = configuration;
|
||||
@@ -48,10 +48,8 @@ public class MarketDataUnitTestClass
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is not working because the website has changed formats
|
||||
/// </summary>
|
||||
[TestMethod]
|
||||
[Ignore]
|
||||
public void AnalystRatingsMarketBeatRetrieval()
|
||||
{
|
||||
String symbol = "AAPL";
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Translate
|
||||
static int Main(string[] args)
|
||||
{
|
||||
IConfigurationBuilder builder = new ConfigurationBuilder()
|
||||
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
|
||||
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: false);
|
||||
IConfigurationRoot configurationRoot = builder.Build();
|
||||
CommandArgs commandArgs = new CommandArgs(args);
|
||||
IServiceCollection services = new ServiceCollection();
|
||||
|
||||
Reference in New Issue
Block a user