-
Notifications
You must be signed in to change notification settings - Fork 6
fix: Changes for websites that do not redirect non www url to www url #248
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
Conversation
src/experimentation/handler.js
Outdated
url: finalUrl, | ||
}; | ||
|
||
const data = await rumAPIClient.getExperimentationData(params); | ||
let data = await rumAPIClient.getExperimentationData(params); | ||
if (data.length === 0 && !finalUrl.toLowerCase().startsWith('www')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!finalUrl.toLowerCase().startsWith('www')
would also return true for sites with valid subdomains such as blog.adobe.com
. We should also include it in the check, otherwise we may end up with something like www.blog.adobe.com > which is wrong
data.length === 0 && hasNonWWWSubdomain(baseURL) && !finalUrl.startsWith('www')`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorporated this.
src/experimentation/handler.js
Outdated
const data = await rumAPIClient.getExperimentationData(params); | ||
let data = await rumAPIClient.getExperimentationData(params); | ||
if (data.length === 0 && !finalUrl.toLowerCase().startsWith('www')) { | ||
finalUrl = 'www.'.concat(finalUrl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use ES6 way of string concatenation:
finalUrl = `www.${finalUrl}`;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorporated this.
This PR will trigger a patch release when merged. |
## [1.15.8](v1.15.7...v1.15.8) (2024-05-08) ### Bug Fixes * Changes for websites that do not redirect non www url to www url ([#248](#248)) ([088ad72](088ad72))
## [1.15.8](v1.15.7...v1.15.8) (2024-05-08) ### Bug Fixes * Changes for websites that do not redirect non www url to www url ([#248](#248)) ([088ad72](088ad72))
🎉 This PR is included in version 1.15.8 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [puppeteer-core](https://redirect.github.com/puppeteer/puppeteer/tree/main#readme) ([source](https://redirect.github.com/puppeteer/puppeteer)) | [`23.11.1` -> `24.1.0`](https://renovatebot.com/diffs/npm/puppeteer-core/23.11.1/24.1.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>puppeteer/puppeteer (puppeteer-core)</summary> ### [`v24.1.0`](https://redirect.github.com/puppeteer/puppeteer/blob/HEAD/CHANGELOG.md#2410-2025-01-15) [Compare Source](https://redirect.github.com/puppeteer/puppeteer/compare/puppeteer-core-v24.0.0...puppeteer-core-v24.1.0) ##### Features - roll to Chrome 132.0.6834.83 ([#​13507](https://redirect.github.com/puppeteer/puppeteer/issues/13507)) ([e282992](https://redirect.github.com/puppeteer/puppeteer/commit/e28299296675c018e38b0367c3e9810a8a63f21c)) ##### Dependencies - The following workspace dependencies were updated - dependencies - puppeteer-core bumped from 24.0.0 to 24.1.0 ##### Bug Fixes - roll to Firefox 134.0.1 ([#​13510](https://redirect.github.com/puppeteer/puppeteer/issues/13510)) ([a50357c](https://redirect.github.com/puppeteer/puppeteer/commit/a50357cc2c84f59f951bc647ac809303d365231a)) ### [`v24.0.0`](https://redirect.github.com/puppeteer/puppeteer/blob/HEAD/CHANGELOG.md#2400-2025-01-09) [Compare Source](https://redirect.github.com/puppeteer/puppeteer/compare/puppeteer-core-v23.11.1...puppeteer-core-v24.0.0) ##### Bug Fixes - include URL fragment into URL returned by HTTPRequest/Response instances ([#​13425](https://redirect.github.com/puppeteer/puppeteer/issues/13425)) ([8ff26ad](https://redirect.github.com/puppeteer/puppeteer/commit/8ff26ad5aff0b366e54e6e85f71577de575ee31d)) - remove erroneous changelog entry ([#​13479](https://redirect.github.com/puppeteer/puppeteer/issues/13479)) ([6de3238](https://redirect.github.com/puppeteer/puppeteer/commit/6de32386c2294a74eb3df3fbc9b179ffeed083f5)) - roll to Chrome 131.0.6778.264 ([#​13468](https://redirect.github.com/puppeteer/puppeteer/issues/13468)) ([aac759b](https://redirect.github.com/puppeteer/puppeteer/commit/aac759b82f0f6427b401bee11ab7c454f0ac6d5b)) - **webdriver:** handle DiscardedBrowsingContextError error ([#​13472](https://redirect.github.com/puppeteer/puppeteer/issues/13472)) ([b903856](https://redirect.github.com/puppeteer/puppeteer/commit/b90385662a7b29e9d36a7cae825e8c0f9f89fac8)) ##### Dependencies - The following workspace dependencies were updated - dependencies - [@​puppeteer/browsers](https://redirect.github.com/puppeteer/browsers) bumped from 2.6.1 to 2.7.0 ##### ⚠ BREAKING CHANGES - remove support for Firefox over CDP ([#​13427](https://redirect.github.com/puppeteer/puppeteer/issues/13427)) - remove deprecated Launch and Connect options ([#​13426](https://redirect.github.com/puppeteer/puppeteer/issues/13426)) - include URL fragment into URL returned by HTTPRequest/Response instances ([#​13425](https://redirect.github.com/puppeteer/puppeteer/issues/13425)) ##### Features - roll to Firefox 134.0 ([#​13470](https://redirect.github.com/puppeteer/puppeteer/issues/13470)) ([3bd3176](https://redirect.github.com/puppeteer/puppeteer/commit/3bd31769b5827305dc553cd36ca40387558b3acd)) ##### Code Refactoring - remove deprecated Launch and Connect options ([#​13426](https://redirect.github.com/puppeteer/puppeteer/issues/13426)) ([20f9f15](https://redirect.github.com/puppeteer/puppeteer/commit/20f9f15d5f94832bd6f5c0e9807a1a53182c49f8)) - remove support for Firefox over CDP ([#​13427](https://redirect.github.com/puppeteer/puppeteer/issues/13427)) ([1a2e91b](https://redirect.github.com/puppeteer/puppeteer/commit/1a2e91b04413e2ed90778b2f8e49549a8e63c139)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 2pm on Monday" in timezone Europe/Zurich, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/adobe/spacecat-content-scraper). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45Mi4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTA3LjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Dominique Jäggi <[email protected]> Co-authored-by: Dominique Jäggi <[email protected]>
## [1.23.11](https://github.com/adobe/spacecat-content-scraper/compare/v1.23.10...v1.23.11) (2025-03-07) ### Bug Fixes * **deps:** update dependency puppeteer-core to v24 ([adobe#248](https://github.com/adobe/spacecat-content-scraper/issues/248)) ([9b92079](https://github.com/adobe/spacecat-content-scraper/commit/9b92079cd961086d47e02dcb29af6e6e374c04aa))
Please ensure your pull request adheres to the following guidelines:
Related Issues
Thanks for contributing!