feat(conf): add Google-Read-Aloud bot config#18
Open
adri wants to merge 1 commit intocnlangzi:mainfrom
Open
Conversation
Add detection for Google's text-to-speech crawler used by Google Assistant and Google Home. Verifies by IP using Google's published user-triggered fetchers list. Ref: https://developers.google.com/crawling/docs/crawlers-fetchers/overview#google-read-aloud
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds configuration for detecting the Google-Read-Aloud text-to-speech crawler as a search engine bot, wired into the existing Google parser and using Google’s published IP range list for user-triggered fetchers for verification. Sequence diagram for Google-Read-Aloud bot detection flowsequenceDiagram
participant Client
participant WebServer
participant BotDetector
participant GoogleParser
participant IpRangeFetcher
Client->>WebServer: HTTP request with User-Agent Google-Read-Aloud
WebServer->>BotDetector: Pass request headers and client_ip
BotDetector->>BotDetector: Match ua against google-read-aloud config
BotDetector->>GoogleParser: Invoke parse with ua and client_ip
GoogleParser->>IpRangeFetcher: Fetch IP ranges from user-triggered-fetchers JSON URL
IpRangeFetcher-->>GoogleParser: Return Google user-triggered IP ranges
GoogleParser->>GoogleParser: Verify client_ip in Google IP ranges
GoogleParser-->>BotDetector: Return BotIdentity Google-Read-Aloud
BotDetector-->>WebServer: Mark request as search_engine bot
WebServer-->>Client: Serve response with bot-specific handling
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #18 +/- ##
===========================================
- Coverage 72.76% 61.80% -10.97%
===========================================
Files 15 24 +9
Lines 661 1000 +339
===========================================
+ Hits 481 618 +137
- Misses 136 324 +188
- Partials 44 58 +14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add detection for Google's text-to-speech crawler used by Google Assistant and Google Home. Verifies by IP using Google's published user-triggered fetchers list.
Ref: https://developers.google.com/crawling/docs/crawlers-fetchers/overview#google-read-aloud
Summary by Sourcery
New Features: