Skip to content

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

Merged
merged 2 commits into from
May 8, 2024

Conversation

raji-unni
Copy link
Contributor

@raji-unni raji-unni commented May 7, 2024

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

Related Issues

Thanks for contributing!

@raji-unni raji-unni requested a review from ekremney May 7, 2024 13:40
url: finalUrl,
};

const data = await rumAPIClient.getExperimentationData(params);
let data = await rumAPIClient.getExperimentationData(params);
if (data.length === 0 && !finalUrl.toLowerCase().startsWith('www')) {
Copy link
Member

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')`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorporated this.

const data = await rumAPIClient.getExperimentationData(params);
let data = await rumAPIClient.getExperimentationData(params);
if (data.length === 0 && !finalUrl.toLowerCase().startsWith('www')) {
finalUrl = 'www.'.concat(finalUrl);
Copy link
Member

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}`;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorporated this.

Copy link

github-actions bot commented May 8, 2024

This PR will trigger a patch release when merged.

@raji-unni raji-unni merged commit 088ad72 into main May 8, 2024
4 checks passed
@raji-unni raji-unni deleted the SITES-21790 branch May 8, 2024 08:53
solaris007 pushed a commit that referenced this pull request May 8, 2024
## [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))
solaris007 pushed a commit that referenced this pull request May 8, 2024
## [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))
@solaris007
Copy link
Member

🎉 This PR is included in version 1.15.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

barshat7 pushed a commit to barshat7/spacecat-audit-worker that referenced this pull request Apr 1, 2025
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)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/puppeteer-core/24.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/puppeteer-core/24.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/puppeteer-core/23.11.1/24.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/puppeteer-core/23.11.1/24.1.0?slim=true)](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
([#&#8203;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
([#&#8203;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
([#&#8203;13425](https://redirect.github.com/puppeteer/puppeteer/issues/13425))
([8ff26ad](https://redirect.github.com/puppeteer/puppeteer/commit/8ff26ad5aff0b366e54e6e85f71577de575ee31d))
- remove erroneous changelog entry
([#&#8203;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
([#&#8203;13468](https://redirect.github.com/puppeteer/puppeteer/issues/13468))
([aac759b](https://redirect.github.com/puppeteer/puppeteer/commit/aac759b82f0f6427b401bee11ab7c454f0ac6d5b))
- **webdriver:** handle DiscardedBrowsingContextError error
([#&#8203;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
-
[@&#8203;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
([#&#8203;13427](https://redirect.github.com/puppeteer/puppeteer/issues/13427))
- remove deprecated Launch and Connect options
([#&#8203;13426](https://redirect.github.com/puppeteer/puppeteer/issues/13426))
- include URL fragment into URL returned by HTTPRequest/Response
instances
([#&#8203;13425](https://redirect.github.com/puppeteer/puppeteer/issues/13425))

##### Features

- roll to Firefox 134.0
([#&#8203;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
([#&#8203;13426](https://redirect.github.com/puppeteer/puppeteer/issues/13426))
([20f9f15](https://redirect.github.com/puppeteer/puppeteer/commit/20f9f15d5f94832bd6f5c0e9807a1a53182c49f8))
- remove support for Firefox over CDP
([#&#8203;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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants