Created
February 27, 2019 13:37
-
-
Save lunarplasma/4aa08a8180f362e22b2b1bed7deb9e20 to your computer and use it in GitHub Desktop.
This script downloads all podcasts from a BBC podcasts page
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
| // Press F12 to get the Developer Console, then paste these 3 lines into the console: | |
| var jq = document.createElement('script'); | |
| jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; | |
| document.getElementsByTagName('head')[0].appendChild(jq); | |
| // Next, paste these two lines in to start the download. | |
| x = 0; | |
| $('a[href*="download/"]').each(function(){setTimeout(_ => this.click(), x); x = x + 5000;}); | |
| /* | |
| How it works: | |
| This uses jquery to find all the 'a' tags (links) which have an href which includes the term "download". | |
| Then, it triggers the click event for each one, but staggers them (by 5000 milliseconds) so that all don't download at once. | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment