Last active
May 2, 2019 08:09
-
-
Save Warafux/9f7694a960ebcd5deca5eb80f7ef7b7a to your computer and use it in GitHub Desktop.
Web Scrapper Github Projects with JQuery
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
//get project name: | |
$("[data-hovercard-type=project]").html().trim() | |
//get project columns: | |
$("div.project-column") | |
//get boxes in columns: | |
$(column).find("div.pl-5") | |
//get column name: | |
$(column).find(".js-project-column-name").text() | |
//get boxes content in columns: | |
$(box).find("p").text() | |
//Example: | |
var columns = $("div.project-column") | |
var t = "" | |
t += $("[data-hovercard-type=project]").html().trim(); | |
columns.each(function(index) { | |
var boxes = $(this).find("div.pl-5") | |
t += "\n-- "+$(this).find(".js-project-column-name").text() | |
boxes.each(function(index) { | |
t += "\n---- "+$(this).find("p").text().replace(/(\r\n|\n|\r)/gm, "") | |
}) | |
}) | |
console.log(t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gists will allow anyone to "easy" export projects from the projects section of a repo.
Checkbox and another more complex card structures are not correctly exported...