Open nelsonic opened 7 years ago
Was looking at this earlier today,
// Pinned Repos
data.pinned = [];
var p = '.pinned-repo-item-content:nth-of-type(' // is this being used?
var urls = $('.pinned-repo-item-content a.text-bold')
var language_color = $('.repo-language-color')
for (var i = 0; i < $('.pinned-repo-item-content').length; i++) {
var pin = {
url: urls[i].attribs.href,
// Want More? see: https://github.com/nelsonic/github-scraper/issues/78
language: language_color[i].css('backgroundColor'),
// stars: ,
// desc: ,
// forks:
}
data.pinned.push(pin);
}
Figured if I could get the backgroundColor I could use this to get the language without having to even think about selecting the lang while dealing with this kind of garbage whitespace...
JavaScript
But I'm having trouble getting the backgroundColor from $('.repo-language-color')...
e.g:
So far we've got the URL of the pinned repo. we would also like to get: