diff --git a/README.md b/README.md index e55854c..305373f 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,22 @@ JSESSIONID="ajax:xxxxxx" ## How do I setup header-based corporate account access? -If you have a corporate connected account you can fix the download issue by using a `headers.txt` as per below. +If you have a corporate connected account you can fix the download issue (where only frist 2 videos download successfully while others fail with "No video URL found" errors) by using a `headers.txt` as per below. + +### Method 1: Using Developer Tools (Recommended) + +1. Create a file named `headers.txt` and place it in the folder you want to download your courses to. +2. Open the Developer Tools in your browser: + - **Chrome**: Press `Ctrl+Shift+I` (Windows/Linux) or `Cmd+Option+I` (macOS) + - **Firefox**: Press `F12` or `Ctrl+Shift+I` (Windows/Linux) or `Cmd+Option+I` (macOS) +3. Go to the **Network** tab and refresh the page. +4. Filter requests by typing `linkedin.com/learning-api` in the filter box to find relevant API requests. +5. Click on any of the filtered requests and go to the **Headers** section. +6. In the **Request Headers** section, you can filter headers by typing `x-li-identity` to quickly find the header value. +7. Copy the `x-li-identity` header value. +8. Open the `headers.txt` file and paste in the values of `x-li-identity` and `User-Agent` as shown below: + +### Method 2: Using Page Source (Alternative) 1. Create a file named `headers.txt` and place it in the folder you want to download your courses to 2. Right click on the page and select view source @@ -121,6 +136,15 @@ If you have a corporate connected account you can fix the download issue by usin 5. Open the `headers.txt` file and paste in the values of `x-li-identity` from the above. +> [!NOTE] +> Page source may show HTML-encoded characters like `=` which should be `=`: +> ``` +> ❌ x-li-identity=MTU2NDI0NjQ5LDIxNzM4MTk1Nik= +> ✅ x-li-identity=MTU2NDI0NjQ5LDIxNzM4MTk1Nik= +> ``` + +### Headers File Format + ```sh x-li-identity=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36