Skip to content

Added only_links_like Feature#50

Open
hartator wants to merge 1 commit intochriskite:nextfrom
hartator:next
Open

Added only_links_like Feature#50
hartator wants to merge 1 commit intochriskite:nextfrom
hartator:next

Conversation

@hartator
Copy link
Copy Markdown

Hi!

Thanks a lot for anemone guys!

I missed a feature that I have implemented, basically the reverse of skip_links_like, which I have called only_links_like to help the crawler to follow only links which matches specified patterns.

Anyway, I wish you great succes with your project!

Best,
Julian

@rcarvalho
Copy link
Copy Markdown

I second this feature! I basically implemented the same thing locally on my machine so I could get it to work. I guess I should've checked here first. Anemone is awesome, btw!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@only_link_patterns.empty? 
 ? @skip_link_patterns.any? { |pattern| link.path =~ pattern }
 : !@only_link_patterns.any? { |pattern| link.path =~ pattern }

@hartator would u care to re-submit in the Medusa fork?

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.

3 participants