Ruby+Anemone Web Crawler: regex to match URLs ending in a series of digits

Suppose I was trying crawl a website a skip a page that ended like so:

http://HIDDENWEBSITE.com/anonimize/index.php?page=press_and_news&subpage=20060117

I am currently using Anemone gem in Ruby to build the crawler. I am using the skip_links_like method but my pattern never seems to match. I am trying to make this as generic as possible so it isn't dependent on subpage but just =2105925 (the digits).

I have tried /=\d+$/ and /\?.*\d+$/ but it doesn't seem to be working.

This similar to Skipping web-pages with extension pdf, zip from crawling in Anemone but I can't make it worth with digits instead of extensions.

Also, testing on http://regexpal.com/ with the pattern =\d+$ will successfully match http://misc.com/test/index.php?page=news&subpage=20060118

EDIT:

Here is the entirety of my code. I wonder if anyone can see exactly what's wrong.

require 'anemone'
...
Anemone.crawl(url, :depth_limit => 3, :obey_robots_txt => true) do |anemone|
  anemone.skip_links_like /\?.*\d+$/
  anemone.on_every_page do |page|
    pURL = page.url.to_s
    puts "Now checking: " + pURL
    bestGuess[pURL] = match_freq( manList, page.doc.inner_text )
    puts "Successfully checked"
  end
end

My output something like this:

...
Now checking: http://MISC.com/about_us/index.php?page=press_and_news&subpage=20110711
Successfully checked
...

Answers


  Anemone.crawl(url, :depth_limit => 3, :obey_robots_txt => true, :skip_query_strings => true) do |anemone|
   anemone.on_every_page do |page|
     pURL = page.url.to_s
     puts "Now checking: " + pURL
      bestGuess[pURL] = match_freq( manList, page.doc.inner_text )
     puts "Successfully checked"
   end
 end

Need Your Help

Radio online on Background - Android

java android sdk radio

Can you help me with this please. I tried to make an radio Android application to run on background, but I failed. Can you help me please...Here's my code:

Regex words with hyphen

python regex

I am looking for a regex to match words (no spaces in them) that have at least one number, one letter (a-zA-Z), and at least one hyphen. And the total size should be between 4 and 40.