-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Drupal UrlScraper #1790
base: main
Are you sure you want to change the base?
Update Drupal UrlScraper #1790
Conversation
I'm trying to test locally, and I'm getting the error below--before my changes and after them. Can anyone help me debug it?
|
It seems that the structure of the Drupal docs has been changed. Please revise item 4 from https://github.com/freeCodeCamp/devdocs/blob/main/docs/adding-docs.md The following patch allowed me to scrape v7 docs: diff --git a/lib/docs/filters/drupal/entries.rb b/lib/docs/filters/drupal/entries.rb
index 9da70441..b0c99d91 100644
--- a/lib/docs/filters/drupal/entries.rb
+++ b/lib/docs/filters/drupal/entries.rb
@@ -20,7 +20,7 @@ module Docs
elsif subpath =~ /core!themes/
'themes'
else
- css('.breadcrumb > a')[1].content
+ css('.breadcrumb a')[1].content
end
end
diff --git a/lib/docs/scrapers/drupal.rb b/lib/docs/scrapers/drupal.rb
index 3798caec..96cca5e9 100644
--- a/lib/docs/scrapers/drupal.rb
+++ b/lib/docs/scrapers/drupal.rb
@@ -10,7 +10,7 @@ module Docs
html_filters.push 'drupal/entries', 'drupal/clean_html', 'title'
options[:decode_and_clean_paths] = true
- options[:container] = '#page-inner'
+ options[:container] = '#page'
options[:title] = false
options[:root_title] = 'Drupal' |
Thank you, @simon04, I've applied your patch. I still get the same runtime error, though, running |
I'm going to go out on a limb and mark this ready for review, unanswered question notwithstanding. 🙂 |
This updates Drupal 7 and 8 and adds Drupal 9 and 10.
about_tmpl.coffee
matches its data inself.attribution
SOURCE
file inpublic/icons/your_scraper_name/
are up-to-date if the documentation has a custom iconself.links
contains up-to-date urls ifself.links
is defined