Skip to content

Conversation

@honzajavorek
Copy link
Collaborator

@honzajavorek honzajavorek commented May 16, 2025

This is a proof of concept exploring whether using the Python course as a template for a brand new JavaScript course would take less time than trying to improve the original JavaScript course. This work is sanctioned by both @mnmkng and @TC-MO. If viable, this should have the potential to implement #1550 and, of course, deprecate #1579

Done

Challenges

Todo

  • rewrite extracting data in the Python course so that it still mentions Decimal, but also converts to cents (it's in saving data, too!) - only after fix: re-order JSON and CSV in Python lessons #1658
  • don't forget any /TBD/ occurrences
  • resolve the temporary symlink to the images directory
  • eventually rename javascript2 to javascript
  • DRY intro of the course? DRY partials?
  • fix sidebar position of the intro
  • add redirects
  • missing semicolon const listingURL = "https://warehouse-theme-metal.myshopify.com/collections/sales"
  • use :::tip admonition for hints in exercises
  • fix: use abstract Markdown numbering

@honzajavorek honzajavorek added the t-academy Issues related to Web Scraping and Apify academies. label May 16, 2025
@honzajavorek honzajavorek force-pushed the honzajavorek/javascript2 branch from f4c5ab8 to ca304ee Compare June 23, 2025 09:44
@apify-service-account
Copy link

Preview for this PR was built for commit ca304ee and is ready at https://pr-1584.preview.docs.apify.com!

@apify-service-account
Copy link

Preview for this PR was built for commit bc2ff070 and is ready at https://pr-1584.preview.docs.apify.com!

@apify-service-account
Copy link

Preview for this PR was built for commit eb05470 and is ready at https://pr-1584.preview.docs.apify.com!

@apify-service-account
Copy link

Preview for this PR was built for commit e3b6f07 and is ready at https://pr-1584.preview.docs.apify.com!

@honzajavorek honzajavorek force-pushed the honzajavorek/javascript2 branch from e3b6f07 to 6e6db97 Compare June 27, 2025 08:32
@apify-service-account
Copy link

Preview for this PR was built for commit 6e6db97 and is ready at https://pr-1584.preview.docs.apify.com!

honzajavorek added a commit that referenced this pull request Jun 27, 2025
… (groundworks) (#1651)

See #1584 for more details. I
carved out these two commits so that we can do incremental reviews of my
changes in subsequent PRs instead of a huge PR with everything stuffed
in it:

- 8e6a303 is a copy-paste of the Python
course to a new directory called `javascript2` (nothing to review,
really)
- 9ccf0df makes it `unlisted`

There are, of course, more changes to come. This is just groundworks.

The `unlisted` trick was recommended by @TC-MO in a [Slack
convo](https://pyvec.slack.com/archives/C03BHBQNNG3/p1750773530207319),
hopefully ensuring the duplicated course won't be visible on production.
Apparently it behaves differently dev vs prod, so I couldn't really
verify it properly locally.

I tried running `npm run build` hoping I'd get a prod build of the docs,
but I only got errors. Using `npm start` I can see the pages in the
navigation, but the warning is in place, so I think Docusaurus picks it
up correctly:

<img width="781" alt="Screenshot 2025-06-27 at 10 37 52"
src="https://github.com/user-attachments/assets/7753def0-c08d-47b5-b0c7-96c98541399a"
/>

Hopefully in the prod build it won't be in the navigation. But in the
case it's not gonna work properly on prod, I'm ready to revert this PR
immediately.
@honzajavorek honzajavorek force-pushed the honzajavorek/javascript2 branch from 6e6db97 to 104c5cc Compare June 27, 2025 13:43
@apify-service-account
Copy link

Preview for this PR was built for commit 104c5cc and is ready at https://pr-1584.preview.docs.apify.com!

@apify-service-account
Copy link

Preview for this PR was built for commit 82bf3ee and is ready at https://pr-1584.preview.docs.apify.com!

@apify-service-account
Copy link

Preview for this PR was built for commit d284f74 and is ready at https://pr-1584.preview.docs.apify.com!

honzajavorek added a commit that referenced this pull request Jun 30, 2025
When working on #1584 I realized
it'd be better if the lesson started with JSON and continued with CSV,
not the other way.

In Python it doesn't matter and in JavaScript it's easier to start with
JSON, which is built-in, and only then move to CSV, which requires an
additional library. So for the sake of having both lessons aligned, I
want to change the order in the Python lesson, too.

So most of the diff is just the two sections reversed, and the two
exercises reversed. I made only a few additional changes to the wording.
@honzajavorek honzajavorek force-pushed the honzajavorek/javascript2 branch from d284f74 to b689317 Compare June 30, 2025 12:32
@apify-service-account
Copy link

Preview for this PR was built for commit b689317 and is ready at https://pr-1584.preview.docs.apify.com!

@apify-service-account
Copy link

Preview for this PR was built for commit 3f87295 and is ready at https://pr-1584.preview.docs.apify.com!

@apify-service-account
Copy link

Preview for this PR was built for commit ee7ae7d9 and is ready at https://pr-1584.preview.docs.apify.com!

@honzajavorek honzajavorek force-pushed the honzajavorek/javascript2 branch from ee7ae7d to fa29e5a Compare July 1, 2025 07:35
@apify-service-account
Copy link

Preview for this PR was built for commit fa29e5a and is ready at https://pr-1584.preview.docs.apify.com!

daveomri pushed a commit to daveomri/apify-docs that referenced this pull request Sep 3, 2025
daveomri pushed a commit to daveomri/apify-docs that referenced this pull request Sep 3, 2025
…ript (apify#1761)

Part of apify#1584

⚠️ 🐍 Includes a small change also to an exercise in the original
`scraping_basics_python` lesson

---------

Co-authored-by: gullmar <[email protected]>
daveomri pushed a commit to daveomri/apify-docs that referenced this pull request Sep 3, 2025
daveomri pushed a commit to daveomri/apify-docs that referenced this pull request Sep 3, 2025
…ipt (apify#1760)

Part of apify#1584, fixes
apify#1648

⚠️ 🐍 Includes respective changes also to the original
`scraping_basics_python` lesson

---------

Co-authored-by: Michał Olender <[email protected]>
daveomri pushed a commit to daveomri/apify-docs that referenced this pull request Sep 3, 2025
As I progressed with apify#1584 I
felt the code examples were starting to be more and more complex. Then I
remembered that when I was young, us jQuery folks used to lean towards a
naming convention where variables holding jQuery selections were
prefixed with $. I changed the code examples in all lessons to adhere to
this as I feel it makes them more readable and less cluttered.

-----

ℹ️ The changes still use `$.map` and `$.each`, because they were made
prior to the facb3c0 commit. It's gonna
happen, but not yet.
daveomri pushed a commit to daveomri/apify-docs that referenced this pull request Sep 3, 2025
As I progressed with apify#1584 I
felt the code examples were starting to be more and more complex. Then I
remembered that when I was young, us jQuery folks used to lean towards a
naming convention where variables holding jQuery selections were
prefixed with $. I changed the code examples in all lessons to adhere to
this as I feel it makes them more readable and less cluttered.

-----

ℹ️ The changes still use `$.map` and `$.each`, because they were made
prior to the facb3c0 commit. It's gonna
happen, but not yet.
daveomri pushed a commit to daveomri/apify-docs that referenced this pull request Sep 3, 2025
As I progressed with apify#1584 I
felt the code examples were starting to be more and more complex. Then I
remembered that when I was young, us jQuery folks used to lean towards a
naming convention where variables holding jQuery selections were
prefixed with $. I changed the code examples in all lessons to adhere to
this as I feel it makes them more readable and less cluttered.

-----

ℹ️ The changes still use `$.map` and `$.each`, because they were made
prior to the facb3c0 commit. It's gonna
happen, but not yet.
daveomri pushed a commit to daveomri/apify-docs that referenced this pull request Sep 3, 2025
As I progressed with apify#1584 I
felt the code examples were starting to be more and more complex. Then I
remembered that when I was young, us jQuery folks used to lean towards a
naming convention where variables holding jQuery selections were
prefixed with $. I changed the code examples in all lessons to adhere to
this as I feel it makes them more readable and less cluttered.

-----

ℹ️ The changes still use `$.map` and `$.each`, because they were made
prior to the facb3c0 commit. It's gonna
happen, but not yet.

---------

Co-authored-by: gullmar <[email protected]>
daveomri pushed a commit to daveomri/apify-docs that referenced this pull request Sep 3, 2025
…ript (apify#1848)

Part of apify#1584

----

⚠️ 🐍 This PR contains also changes to the Python course, to keep the
lessons consistent and synced.

---------

Co-authored-by: Michał Olender <[email protected]>
daveomri pushed a commit to daveomri/apify-docs that referenced this pull request Sep 3, 2025
…ut JavaScript (apify#1846)

Part of apify#1584

----

⚠️ 🐍 This PR contains also a small change to the Python course, to keep
the lessons consistent and synced.

---------

Co-authored-by: gullmar <[email protected]>
honzajavorek added a commit that referenced this pull request Sep 3, 2025
…cript (#1847)

Part of #1584

----

⚠️ 🐍 This PR contains also changes to the Python course, to keep the
lessons consistent and synced.

---------

Co-authored-by: Michał Olender <[email protected]>
Co-authored-by: gullmar <[email protected]>
@honzajavorek honzajavorek force-pushed the honzajavorek/javascript2 branch from 9d7c368 to 479a736 Compare September 3, 2025 10:55
@apify-service-account
Copy link

Preview for this PR was built for commit 479a736 and is ready at https://pr-1584.preview.docs.apify.com!

@honzajavorek honzajavorek force-pushed the honzajavorek/javascript2 branch from 479a736 to 5b59e87 Compare September 3, 2025 10:59
@apify-service-account
Copy link

Preview for this PR was built for commit 5b59e87 and is ready at https://pr-1584.preview.docs.apify.com!

honzajavorek added a commit that referenced this pull request Sep 3, 2025
…ript (#1845)

Part of #1584

----

⚠️ 🐍 This PR contains also a small change to the Python course, to keep
the lessons consistent and synced.
@honzajavorek honzajavorek force-pushed the honzajavorek/javascript2 branch from 5b59e87 to 1ed4660 Compare September 3, 2025 19:20
@apify-service-account
Copy link

Preview for this PR was built for commit 1ed4660 and is ready at https://pr-1584.preview.docs.apify.com!

@honzajavorek honzajavorek force-pushed the honzajavorek/javascript2 branch from 1ed4660 to 86bb36f Compare September 4, 2025 08:20
@apify-service-account
Copy link

Preview for this PR was built for commit 86bb36f and is ready at https://pr-1584.preview.docs.apify.com!

@honzajavorek honzajavorek force-pushed the honzajavorek/javascript2 branch from 86bb36f to 2ec727c Compare September 4, 2025 13:18
@apify-service-account
Copy link

Preview for this PR was built for commit 2ec727c and is ready at https://pr-1584.preview.docs.apify.com!

@honzajavorek honzajavorek mentioned this pull request Sep 8, 2025
5 tasks
@honzajavorek
Copy link
Collaborator Author

Closing in favor of #1907

@honzajavorek honzajavorek deleted the honzajavorek/javascript2 branch September 8, 2025 14:12
honzajavorek added a commit that referenced this pull request Nov 21, 2025
The aim of this PR is to publish the new JS course as described in the
PR description of #1584, and to
unlist the old JS course. The old one should be still accessible for a
grace period.

_Replacing the old JS course with a new one, which is identical to the
Python course, has been previously sanctioned by both Ondra and Michał._

### The Plan
- [x] The `scraping_basics_javascript` root leads to the new JS course.
- [x] The pages of the old JS course move to
`legacy/web-scraping-for-beginners`. It's gonna be a read-only archive.
Must be `noindex` to avoid cannibalization issues.
- [x] The `web-scraping-for-beginners`, i.e. the root of the old JS
course URLs, leads to redirects which take people to corresponding pages
in the new JS course. This lets us use the SEO juice from the old URLs.
- [x] The redirects add `#old-js-course` to the URL. The new JS course
pages contain a component which, if `#old-js-course` is present in the
URL, displays a _commemorative plaque_ about the change and link the old
JS course. This improves UX: "Hey, you have until 1.1.2026 to go through
this course. After that please refer to the newly updated JS course
<link>."
- [ ] At some point in future, we'll nuke the archive of the old JS
course and link Internet Archive instead in the _commemorative plaque_.

_The Plan is a result of a [long discussion between Michał, Aleš, and
me](https://pyvec.slack.com/archives/C03BHBQNNG3/p1756992893312119),
which takes into account both the UX of existing users of the JS course
and SEO._

### Related Work
- Depends on #1889
- Closes #1584
- Closes #1579
- Fixes #947
- Discovered #1900
- Closes #2009 (PoC)
- Contains #2023
- Closes #1550

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Publishes the new JS course, archives the old one with redirects and
an on-page notice, and updates links, content, and Nginx rewrites across
the docs.
> 
> - **Academy: New JS course rollout**
> - Publishes `academy/webscraping/scraping_basics_javascript/*` (new
slugs, content, and index) and updates internal references to it.
> - Archives the old JS course under
`academy/webscraping/scraping_basics_legacy/*` with `noindex` and a
legacy notice.
> - Adds `src/components/LegacyJsCourseAdmonition.jsx` and integrates it
into new course pages to show a notice when `?legacy-js-course=` is
present.
> - Updates course metadata (titles/sidebar labels) in
Expert/Anti‑scraping lessons and adds caution notes where content
depends on the legacy course.
> - Updates homepage card and other references to point to
`'/academy/scraping-basics-javascript'`.
> - **Routing/Redirects (Nginx)**
> - Redirects old JS course paths
`^/academy/web-scraping-for-beginners...` to
`'/academy/scraping-basics-javascript'` with `?legacy-js-course=...`.
> - Adds other redirects (e.g., output-schema → dataset-schema, academy
php path, advanced web scraping path fix).
> - **Content/link maintenance**
> - Repoints numerous lessons to new paths (e.g., tutorials,
Puppeteer/Playwright, advanced courses) and updates sample URLs in
integrations (Make) to the new JS course.
> - Minor copy/heading tweaks (e.g., RPA title), and consistent
slug/slug changes across documents.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2840ebd. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Michał Olender <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-academy Issues related to Web Scraping and Apify academies.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

F1 changed website, few Apify Academy exercises are broken Update Academy's approach to setting up a Node.js project

3 participants