Created
October 24, 2017 01:16
-
-
Save cold-logic/39adf38dcc2a9957baca90df4ac9897b to your computer and use it in GitHub Desktop.
Export a list of Humble Bundle eBooks
This file contains 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
{ | |
let a = [], b // Setup local vars | |
console.clear() // Clear the console | |
// For each item | |
$(".gameinfo").each(function() { | |
// Get the title & subtitle | |
let title = $(this).find('.title').text().trim() | |
let subtitle = $(this).find('.subtitle').text().trim() | |
a.push(`${title} - ${subtitle} #Humble`) | |
// Add the download URLs | |
$(this).siblings('.downloads').find('.js-start-download').find('a').each(function() { | |
a.push(`\t${this.href}`) | |
}) | |
}) | |
b = a.join("\n") // Add new lines | |
copy(b) // Copy to clipboard | |
console.log(b) // Log to console | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment