Finish Puppeteer scraper
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 47 KiB |
|
@ -1,5 +1,8 @@
|
|||
[
|
||||
[
|
||||
"2018-09-23",
|
||||
"New documentation: <a href=\"/puppeteer/\">Puppeteer</a>"
|
||||
], [
|
||||
"2018-08-12",
|
||||
"New documentations: <a href=\"/dart/\">Dart</a> and <a href=\"/qt/\">Qt</a>"
|
||||
], [
|
||||
|
|
|
@ -178,3 +178,4 @@
|
|||
._icon-bash:before { background-position: -6rem -3rem; @extend %doc-icon-2; }
|
||||
._icon-dart:before { background-position: -7rem -3rem; @extend %doc-icon-2; }
|
||||
._icon-qt:before { background-position: -8rem -3rem; @extend %doc-icon-2; }
|
||||
._icon-puppeteer:before { background-position: -9rem -3rem; @extend %doc-icon-2; }
|
||||
|
|
|
@ -2,18 +2,20 @@ module Docs
|
|||
class Puppeteer
|
||||
class CleanHtmlFilter < Filter
|
||||
def call
|
||||
at_css('h1').content = 'Puppeteer Documentation'
|
||||
|
||||
# None of the elements to remove have classes, so the order of the remove calls is trivial
|
||||
|
||||
# Remove links to previous versions of the reference
|
||||
at_css('h5').remove
|
||||
at_css('h1 + ul').remove
|
||||
|
||||
# Remove table of contents
|
||||
at_css('h5').remove
|
||||
at_css('ul').remove
|
||||
at_css('h1 + h5').remove
|
||||
at_css('h1 + ul').remove
|
||||
|
||||
# Make headers bigger by transforming them into a bigger variant
|
||||
css('h3').each {|node| node.name = 'h2'}
|
||||
css('h4').each {|node| node.name = 'h3'}
|
||||
css('h3').each { |node| node.name = 'h2' }
|
||||
css('h4').each { |node| node.name = 'h3' }
|
||||
|
||||
doc
|
||||
end
|
||||
|
|
|
@ -17,7 +17,7 @@ module Docs
|
|||
|
||||
# Prepend events with the class name
|
||||
if current_name.start_with?('event: ')
|
||||
current_name = "#{name} event: '#{current_name[/'(.*)'/, 1]}'"
|
||||
current_name = "#{name} event: #{current_name[/'(.*)'/, 1]}"
|
||||
end
|
||||
|
||||
# Remove arguments from functions
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Docs
|
||||
class Puppeteer < Github
|
||||
self.release = '1.6.2'
|
||||
self.base_url = 'https://github.com/GoogleChrome/puppeteer/blob/v1.6.2/docs/api.md'
|
||||
self.release = '1.8.0'
|
||||
self.base_url = 'https://github.com/GoogleChrome/puppeteer/blob/v1.8.0/docs/api.md'
|
||||
self.links = {
|
||||
code: 'https://github.com/GoogleChrome/puppeteer'
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 661 B After Width: | Height: | Size: 484 B |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 857 B |