Skip to content

Conversation

@raminmjj
Copy link

This method returns the value of the href.

Copy link
Owner

@rflechner rflechner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contrib.
I will try to make this project more testable to facilitate maintainability

{
var ret = string.Empty;
if (node.HasAttributes)
ret = node.Attributes["href"].Value;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

risk of Exception when href is not present

case ElementSearchKind.Title:
return from n in html.Descendants(tagName)
let title = n.GetAttributeValue("title", string.Empty)
let fixedTitle = title.Replace(" ", " ").Trim()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will only treat double spaces cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants