Skip to content

Commit

Permalink
get experiences content
Browse files Browse the repository at this point in the history
  • Loading branch information
pdanielkoe committed Mar 23, 2022
1 parent b383e87 commit 7b78986
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions scripts/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,22 @@ function extract() {
///extraction of profile data ends here///

///extraction of experiences below
var nodes = $("#experience-section > ul > li");
var nodes = document.querySelector('div#experience')?.parentElement.querySelectorAll('ul.pvs-list > li.artdeco-list__item > div.pvs-entity') || [];
//alert(JSON.stringify(nodes));
let UwU = [] //init array of uwu company data

//loop over nodes to push data in UwU
for(const node of nodes) {
for (const node of nodes) {

let experiences = node.querySelectorAll('span.visually-hidden');

let experiences_strings = []

for (const experience of experiences) {
// console.log(experience.textContent);
experiences_strings.push(experience.textContent);
}

const titleElement = node.querySelector('h3');
var title = titleElement?.textContent || null
title = getCleanText(title);
Expand Down Expand Up @@ -229,17 +239,19 @@ function extract() {
var location = locationElement?.textContent || null;
location = getCleanText(location);

//UwU push!
UwU.push({
title,
company,
employmentType,
location,
startDate,
endDate,
endDateIsPresent,
description
});
// //UwU push!
// UwU.push({
// title,
// company,
// employmentType,
// location,
// startDate,
// endDate,
// endDateIsPresent,
// description
// });

UwU.push(experiences_strings);


}//loop ends here
Expand Down

0 comments on commit 7b78986

Please sign in to comment.