Преглед на файлове

Don't scrape MDN articles that haven't been written yet

Thibaut преди 11 години
родител
ревизия
4a72a972df
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      lib/docs/scrapers/mdn/mdn.rb

+ 3 - 0
lib/docs/scrapers/mdn/mdn.rb

@@ -10,6 +10,9 @@ module Docs
     text_filters.insert_before 'attribution', 'mdn/contribute_link'
 
     options[:trailing_slash] = false
+
+    options[:skip_link] = ->(link) { link['title'].try(:include?, 'hasn\'t been written yet'.freeze) }
+
     options[:attribution] = <<-HTML
       &copy; 2014 Mozilla Contributors<br>
       Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.