Skip to content

Commit

Permalink
publish raw orbit html
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelnindodev committed Oct 18, 2023
1 parent 1baf93e commit cb3c40a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/core/scrapping/orbit/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { getConfig } from "../../..";
import { BetProvider } from "../../../bet_providers";
import { OrbitProvider } from "../../../bet_providers/orbit";
import { RedisSingleton } from "../../../datastores/redis";
import { getRedisHtmlParserChannelName } from "../../../utils/redis";
import { PuppeteerPageLoadPolicy } from "../../../utils/types/common";
import { Result } from "../../../utils/types/result_type";
import { getHtmlForScrollingPage } from "../scrolling_scrapper";
Expand Down Expand Up @@ -60,6 +61,17 @@ export class OrbitScrapper extends BaseScrapper {
if (getHtmlResult.result === "success") {
logger.info("Successfully fetched html for url. ", metadata);
logger.info(getHtmlResult.value.html);
this.publishRawHtmlToRedis(
getRedisPublisherResult.value,
getRedisHtmlParserChannelName(this.betProvider, game),
{
betProviderName: this.betProvider.name,
betType: game.betType,
fromUrl: game.url,
gameName: game.name,
rawHtml: getHtmlResult.value.html
}
);
} else {
logger.error("An error occurred while fetching html for page", metadata);
}
Expand Down

0 comments on commit cb3c40a

Please sign in to comment.