Skip to content

Commit

Permalink
Merge branch 'hotfix/2.0.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
KarmaKamikaze committed Sep 25, 2024
2 parents cdbf107 + 0383958 commit fce698e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion MoxfieldPriceScraper/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY *.csproj ./
RUN DOTNET_EnableWriteXorExecute=0 dotnet restore

COPY . ./
RUN DOTNET_EnableWriteXorExecute=0 dotnet publish -c $BUILD_CONFIGURATION -o out --no-restore -p:DOCKER_BUILD=true
RUN DOTNET_EnableWriteXorExecute=0 dotnet publish -c $BUILD_CONFIGURATION -p:DOCKER_BUILD=true -o out --no-restore

FROM mcr.microsoft.com/dotnet/runtime:8.0 AS runtime
WORKDIR /app
Expand Down
6 changes: 3 additions & 3 deletions MoxfieldPriceScraper/MoxfieldScraper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,14 @@ private void InitializeWebDriver()
chromeOptions.AddArgument("--window-size=2560,1440"); // Set window size
chromeOptions.AddArgument("--log-level=3"); // Disable logging
chromeOptions.AddExcludedArguments("enable-logging"); // Disable logging
chromeOptions.BinaryLocation = GetChromeLocation();
var preferences = new Dictionary<string, object>
{
{ "profile.managed_default_content_settings.images", 2 } // Disable image loading
};
chromeOptions.AddUserProfilePreference("prefs", preferences);

#if DOCKER
// Skip driver setup for ARM architecture
chromeOptions.BinaryLocation = GetChromeLocation();
#else
new DriverManager().SetUpDriver(new ChromeConfig());
#endif
Expand All @@ -139,7 +138,8 @@ private static string GetChromeLocation()
{
var options = new ChromeOptions
{
BrowserVersion = "stable"
BrowserVersion = "stable",
BinaryLocation = "/usr/bin/chromium"
};
return new DriverFinder(options).GetBrowserPath();
}
Expand Down

0 comments on commit fce698e

Please sign in to comment.