@mvegter/scrapedin 1.0.29 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mvegter/scrapedin",
3
- "version": "1.0.29",
3
+ "version": "1.0.32",
4
4
  "description": "linkedin scraper for 2020 website",
5
5
  "keywords": [
6
6
  "linkedin",
@@ -21,11 +21,11 @@
21
21
  "author": "Wagner Leonardi <leonardiwagner@gmail.com>",
22
22
  "license": "Apache-2.0",
23
23
  "dependencies": {
24
- "puppeteer": "12.0.1",
25
- "winston": "3.3.3"
24
+ "puppeteer": "14.1.1",
25
+ "winston": "3.7.2"
26
26
  },
27
27
  "devDependencies": {
28
- "standard": "16.0.4"
28
+ "standard": "17.0.0"
29
29
  },
30
30
  "engines": {
31
31
  "node": ">= 7.6.0"
@@ -2,13 +2,13 @@ const logger = require('../logger')(__filename)
2
2
  const pkg = require('../package')
3
3
 
4
4
  module.exports = (profile) => {
5
- if(!profile.profile.name) {
5
+ if(!profile?.profile?.name) {
6
6
  const messageError = `LinkedIn website changed and ${pkg.name} ${pkg.version} can't read basic data. Please report this issue at ${pkg.bugs.url}`
7
7
  logger.error(messageError, '')
8
8
  throw new Error(messageError)
9
9
  }
10
10
 
11
- profile.profile.summary = profile.about.text
11
+ profile.profile.summary = profile?.about?.text
12
12
 
13
13
  profile.positions.forEach((position) => {
14
14
  if(position.title){
@@ -24,6 +24,11 @@ module.exports = (profile) => {
24
24
  if(role.title) {
25
25
  role.title = role.title.replace('Title\n', '')
26
26
  }
27
+ if (role.date) {
28
+ role.date1 = role.date.replace('·', '-').split('-')[0].trim()
29
+ role.date2 = role.date.replace('·', '-').split('-')[1].trim()
30
+ delete role.date
31
+ }
27
32
  if(role.description) {
28
33
  role.description = role.description.replace('See more', '')
29
34
  role.description = role.description.replace('see more', '')
@@ -21,7 +21,7 @@ const template = {
21
21
  }
22
22
  },
23
23
  positions: {
24
- selector: '#experience-section li:not(.pv-entity__position-group-role-item)',
24
+ selector: 'div[id="experience"] + div + div li.artdeco-list__item',
25
25
  fields: {
26
26
  title: 'h3',
27
27
  link: {
@@ -32,7 +32,7 @@ const template = {
32
32
  selector: 'a',
33
33
  attribute: 'href'
34
34
  },
35
- companyName: '.pv-entity__secondary-title',
35
+ companyName: 'span.t-bold span',
36
36
  location: '.pv-entity__location span:last-child',
37
37
  description: '.pv-entity__description',
38
38
  date1: '.pv-entity__date-range span:last-child',
@@ -41,10 +41,9 @@ const template = {
41
41
  selector: 'li',
42
42
  hasChildrenFields: true,
43
43
  fields: {
44
- title: 'h3',
44
+ title: 'span.t-bold span:last-child',
45
45
  description: '.pv-entity__description',
46
- date1: '.pv-entity__date-range span:last-child',
47
- date2: '.pv-entity__bullet-item-v2',
46
+ date: '.t-14.t-normal:last-child span:first-child',
48
47
  location: '.pv-entity__location span:last-child'
49
48
  }
50
49
  }