From d96ce26bb7c73d42260b2fe7878a539837ea2f6f Mon Sep 17 00:00:00 2001 From: Thibaut Date: Sat, 8 Aug 2015 09:36:39 -0400 Subject: [PATCH] Improve React scraper --- lib/docs/filters/react/entries.rb | 6 +++--- lib/docs/scrapers/react.rb | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/docs/filters/react/entries.rb b/lib/docs/filters/react/entries.rb index c6b707e2..07ff0b69 100644 --- a/lib/docs/filters/react/entries.rb +++ b/lib/docs/filters/react/entries.rb @@ -2,9 +2,9 @@ module Docs class React class EntriesFilter < Docs::EntriesFilter API_SLUGS = %w( - top-level-api - component-api - component-specs + docs/top-level-api + docs/component-api + docs/component-specs ) def get_name diff --git a/lib/docs/scrapers/react.rb b/lib/docs/scrapers/react.rb index fe10e5a8..11888d2c 100644 --- a/lib/docs/scrapers/react.rb +++ b/lib/docs/scrapers/react.rb @@ -3,22 +3,24 @@ module Docs self.name = 'React' self.type = 'react' self.version = '0.13.3' - self.base_url = 'http://facebook.github.io/react/docs/' - self.root_path = 'getting-started.html' + self.base_url = 'https://facebook.github.io/react/' + self.root_path = 'docs/getting-started.html' self.links = { - home: 'http://facebook.github.io/react/', + home: 'https://facebook.github.io/react/', code: 'https://github.com/facebook/react' } html_filters.push 'react/entries', 'react/clean_html' options[:container] = '.documentationContent' - + options[:only_patterns] = [/\Adocs\//, /\Atips\//] options[:skip] = %w( - videos.html - complementary-tools.html - examples.html - conferences.html) + docs/ + docs/videos.html + docs/complementary-tools.html + docs/examples.html + docs/conferences.html + tips/introduction.html) options[:attribution] = <<-HTML © 2013–2015 Facebook Inc.