private async Task <SocialLinksDto> GetPlayerSocialLinksAsync(PlayerDto playerDto) { var playerStatsPage = await this.context.OpenAsync(playerDto.PLTotalStatsLink); var socilaLinksDto = new SocialLinksDto { FacebookLink = playerStatsPage.QuerySelector(".facebook-option")?.GetAttribute("href"), TweeterLink = playerStatsPage.QuerySelector(".twitter-option")?.GetAttribute("href"), InstagramLink = playerStatsPage.QuerySelector(".instagram-option")?.GetAttribute("href"), }; return(socilaLinksDto); }
private async Task<SocialLinksDto> GetSocialLinksDto(string clubStadiumLink) { var clubStadiumPage = await this.context.OpenAsync(clubStadiumLink); var socialLinkDto = new SocialLinksDto { WebsiteLink = clubStadiumPage.QuerySelector(".website > a").GetAttribute("href"), FacebookLink = clubStadiumPage.QuerySelector(".facebook-option").GetAttribute("href"), TweeterLink = clubStadiumPage.QuerySelector(".twitter-option").GetAttribute("href"), InstagramLink = clubStadiumPage.QuerySelector(".instagram-option").GetAttribute("href"), }; return socialLinkDto; }