Push working comment scraper logic

This commit is contained in:
Preston 2020-09-26 11:43:01 -04:00
parent 4ce826b59e
commit aa2f4b8e10
5 changed files with 112 additions and 298 deletions

283
package-lock.json generated
View File

@ -685,14 +685,6 @@
"requires": {
"@babel/helper-create-class-features-plugin": "^7.10.4",
"@babel/helper-plugin-utils": "^7.10.4"
},
"dependencies": {
"@babel/helper-plugin-utils": {
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
"integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
"dev": true
}
}
},
"@babel/plugin-proposal-dynamic-import": {
@ -4462,7 +4454,8 @@
"bluebird": {
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.1.tgz",
"integrity": "sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg=="
"integrity": "sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg==",
"dev": true
},
"bluebird-lst": {
"version": "1.0.9",
@ -4537,7 +4530,8 @@
"boolbase": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
"dev": true
},
"boolean": {
"version": "3.0.1",
@ -5181,29 +5175,6 @@
"integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==",
"dev": true
},
"cheerio": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz",
"integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=",
"requires": {
"css-select": "~1.2.0",
"dom-serializer": "~0.1.0",
"entities": "~1.1.1",
"htmlparser2": "^3.9.1",
"lodash.assignin": "^4.0.9",
"lodash.bind": "^4.1.4",
"lodash.defaults": "^4.0.1",
"lodash.filter": "^4.4.0",
"lodash.flatten": "^4.2.0",
"lodash.foreach": "^4.3.0",
"lodash.map": "^4.4.0",
"lodash.merge": "^4.4.0",
"lodash.pick": "^4.2.1",
"lodash.reduce": "^4.4.0",
"lodash.reject": "^4.4.0",
"lodash.some": "^4.4.0"
}
},
"chokidar": {
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz",
@ -5751,22 +5722,6 @@
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
"dev": true
},
"control.monads": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/control.monads/-/control.monads-0.6.0.tgz",
"integrity": "sha1-xQwVjh3RLKfgX8w3iPDiGNfIU4g=",
"requires": {
"core.lambda": "^1.0.0",
"xtend": "^2.2.0"
},
"dependencies": {
"xtend": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-2.2.0.tgz",
"integrity": "sha1-7vax8ZjByN6vrYsXZaBNrUoBxak="
}
}
},
"convert-source-map": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
@ -6021,11 +5976,6 @@
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"core.lambda": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/core.lambda/-/core.lambda-1.0.0.tgz",
"integrity": "sha1-EmCyV9SLb4MMBgvx/OVnZp9NHTU="
},
"crc": {
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz",
@ -6291,6 +6241,7 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
"integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=",
"dev": true,
"requires": {
"boolbase": "~1.0.0",
"css-what": "2.1",
@ -6301,7 +6252,8 @@
"css-what": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.2.tgz",
"integrity": "sha512-wan8dMWQ0GUeF7DGEPVjhHemVW/vy6xUYmFzRY8RYqgA0JtXC9rJmbScBjqSu6dg9q0lwPQy6ZAmJVr3PPTvqQ=="
"integrity": "sha512-wan8dMWQ0GUeF7DGEPVjhHemVW/vy6xUYmFzRY8RYqgA0JtXC9rJmbScBjqSu6dg9q0lwPQy6ZAmJVr3PPTvqQ==",
"dev": true
},
"cssesc": {
"version": "3.0.0",
@ -6357,16 +6309,6 @@
"whatwg-url": "^8.0.0"
}
},
"data.either": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/data.either/-/data.either-1.5.2.tgz",
"integrity": "sha512-ADXzxd3HiUzK+X0Txy8ZxzGKlQcVVMITkQ6yOWZ61EFxQ4a4YEHIMI4mPYc7U4q/3btGNMpJ9+Mt+Q/IWAQCZw=="
},
"data.task": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/data.task/-/data.task-3.1.2.tgz",
"integrity": "sha512-gGDjno8m/FS1kdMU3EmKcLaO1enFyfCV/EscvDZ4+KZDSg9xHePa2VFfWd+QO5PUp18NdCIziOpaSUE4Efw8/w=="
},
"dateformat": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz",
@ -6382,6 +6324,7 @@
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
@ -6794,6 +6737,7 @@
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz",
"integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=",
"dev": true,
"requires": {
"domelementtype": "~1.1.1",
"entities": "~1.1.1"
@ -6802,7 +6746,8 @@
"domelementtype": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs="
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=",
"dev": true
}
}
},
@ -6820,7 +6765,8 @@
"domelementtype": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
"integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w=="
"integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
"dev": true
},
"domexception": {
"version": "2.0.1",
@ -6843,6 +6789,7 @@
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz",
"integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==",
"dev": true,
"requires": {
"domelementtype": "1"
}
@ -6851,6 +6798,7 @@
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
"integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
"dev": true,
"requires": {
"dom-serializer": "0",
"domelementtype": "1"
@ -7762,7 +7710,8 @@
"entities": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
"integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w=="
"integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
"dev": true
},
"env-paths": {
"version": "2.2.0",
@ -10424,10 +10373,16 @@
}
}
},
"html2json": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/html2json/-/html2json-1.0.2.tgz",
"integrity": "sha1-ydbSAvplQCOGwgKzRc9RvOgO0e8="
},
"htmlparser2": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
"integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==",
"dev": true,
"requires": {
"domelementtype": "^1.3.1",
"domhandler": "^2.3.0",
@ -10441,6 +10396,7 @@
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.5.0.tgz",
"integrity": "sha512-gSz026xs2LfxBPudDuI41V1lka8cxg64E66SGe78zJlsUofOg/yqwezdIcdfwik6B4h8LFmWPA9ef9X3FiNFLA==",
"dev": true,
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
@ -13298,16 +13254,6 @@
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
"dev": true
},
"lodash.assignin": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz",
"integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI="
},
"lodash.bind": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz",
"integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU="
},
"lodash.debounce": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
@ -13316,7 +13262,8 @@
"lodash.defaults": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
"integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw="
"integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=",
"dev": true
},
"lodash.difference": {
"version": "4.5.0",
@ -13324,20 +13271,11 @@
"integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=",
"dev": true
},
"lodash.filter": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz",
"integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4="
},
"lodash.flatten": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz",
"integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8="
},
"lodash.foreach": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz",
"integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM="
"integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=",
"dev": true
},
"lodash.isequal": {
"version": "4.5.0",
@ -13350,36 +13288,6 @@
"integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=",
"dev": true
},
"lodash.map": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz",
"integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM="
},
"lodash.merge": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
},
"lodash.pick": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz",
"integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM="
},
"lodash.reduce": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz",
"integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs="
},
"lodash.reject": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz",
"integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU="
},
"lodash.some": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz",
"integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0="
},
"lodash.sortby": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
@ -13967,11 +13875,6 @@
"resolved": "https://registry.npmjs.org/modify-filename/-/modify-filename-1.1.0.tgz",
"integrity": "sha1-mi3sg4Bvuy2XXyK+7IWcoms5OqE="
},
"moment": {
"version": "2.24.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
"integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
},
"move-concurrently": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
@ -14522,6 +14425,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
"integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==",
"dev": true,
"requires": {
"boolbase": "~1.0.0"
}
@ -15734,11 +15638,6 @@
"sisteransi": "^1.0.4"
}
},
"propper": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/propper/-/propper-1.0.3.tgz",
"integrity": "sha512-JiphDbn2afwuT1JH/MrTmyXHgi+yT5j/ByxfPRKHBzmAxFLo8ZjowVKvCju1ndGQwrjEu/W0nIlqzxCyTps2/A=="
},
"proto-list": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
@ -15873,11 +15772,6 @@
"integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==",
"dev": true
},
"ramda": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/ramda/-/ramda-0.23.0.tgz",
"integrity": "sha1-zNE//3NJepOXTj6GMnv9h71ujis="
},
"randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
@ -16371,59 +16265,6 @@
"integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
"dev": true
},
"request": {
"version": "2.88.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
"integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
"requires": {
"aws-sign2": "~0.7.0",
"aws4": "^1.8.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.6",
"extend": "~3.0.2",
"forever-agent": "~0.6.1",
"form-data": "~2.3.2",
"har-validator": "~5.1.0",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.19",
"oauth-sign": "~0.9.0",
"performance-now": "^2.1.0",
"qs": "~6.5.2",
"safe-buffer": "^5.1.2",
"tough-cookie": "~2.4.3",
"tunnel-agent": "^0.6.0",
"uuid": "^3.3.2"
}
},
"request-promise": {
"version": "4.2.5",
"resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.5.tgz",
"integrity": "sha512-ZgnepCykFdmpq86fKGwqntyTiUrHycALuGggpyCZwMvGaZWgxW6yagT0FHkgo5LzYvOaCNvxYwWYIjevSH1EDg==",
"requires": {
"bluebird": "^3.5.0",
"request-promise-core": "1.1.3",
"stealthy-require": "^1.1.1",
"tough-cookie": "^2.3.3"
}
},
"request-promise-core": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz",
"integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==",
"requires": {
"lodash": "^4.17.15"
},
"dependencies": {
"lodash": {
"version": "4.17.19",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
}
}
},
"request-promise-native": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz",
@ -16556,15 +16397,6 @@
"integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=",
"dev": true
},
"retry-task": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/retry-task/-/retry-task-1.0.1.tgz",
"integrity": "sha1-cFFU2M6cb9BM0sLxrtIhzUOk5Ps=",
"requires": {
"core.lambda": "^1.0.0",
"data.task": "^3.1.1"
}
},
"reusify": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
@ -17520,7 +17352,8 @@
"stealthy-require": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
"integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks="
"integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=",
"dev": true
},
"stream-browserify": {
"version": "2.0.2",
@ -17802,6 +17635,7 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
"integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
"dev": true,
"requires": {
"safe-buffer": "~5.1.0"
}
@ -18380,6 +18214,7 @@
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
"integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
"dev": true,
"requires": {
"psl": "^1.1.24",
"punycode": "^1.4.1"
@ -18388,7 +18223,8 @@
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
"dev": true
}
}
},
@ -18911,7 +18747,8 @@
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
},
"util.promisify": {
"version": "1.0.0",
@ -20370,44 +20207,6 @@
"axios": "^0.19.2"
}
},
"youtube-comments-fetch": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/youtube-comments-fetch/-/youtube-comments-fetch-1.0.1.tgz",
"integrity": "sha512-qlCweOsnpwLsrEijtgIOvzsLXFhXK9mKNvy/wqA08A/xRabXLDaa9cur7IPNtFdYsJc13Tt7E6n+l2qzkH6iKw==",
"requires": {
"cheerio": "^0.22.0",
"control.monads": "^0.6.0",
"core.lambda": "^1.0.0",
"data.either": "^1.4.0",
"data.task": "^3.1.1",
"debug": "^2.2.0",
"moment": "^2.21.0",
"propper": "^1.0.2",
"ramda": "^0.23.0",
"request": "^2.88.0",
"request-promise": "^4.2.2",
"retry-task": "^1.0.1"
}
},
"youtube-comments-task": {
"version": "1.3.15",
"resolved": "https://registry.npmjs.org/youtube-comments-task/-/youtube-comments-task-1.3.15.tgz",
"integrity": "sha512-ChjoAokZwmSi6IzzctTEQXWbzxQ3T9dX/VmeyGyDSPKcwcRNvucDBn/G4WakO+UzW0FkCniZK0YUyrznTN15rw==",
"requires": {
"cheerio": "^0.22.0",
"control.monads": "^0.6.0",
"core.lambda": "^1.0.0",
"data.either": "^1.4.0",
"data.task": "^3.1.1",
"debug": "^2.2.0",
"moment": "^2.21.0",
"propper": "^1.0.2",
"ramda": "^0.23.0",
"request": "^2.88.0",
"request-promise": "^4.2.2",
"retry-task": "^1.0.1"
}
},
"youtube-suggest": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/youtube-suggest/-/youtube-suggest-1.1.0.tgz",
@ -20425,6 +20224,14 @@
"querystring": "^0.2.0"
}
},
"yt-comment-scraper": {
"version": "git+https://github.com/PrestonN/yt-comment-scraper.git#59e2002646a70a302f7433b963ef61fdd0f80e50",
"from": "git+https://github.com/PrestonN/yt-comment-scraper.git",
"requires": {
"axios": "^0.19.2",
"html2json": "^1.0.2"
}
},
"yt-dash-manifest-generator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/yt-dash-manifest-generator/-/yt-dash-manifest-generator-1.1.0.tgz",

View File

@ -40,10 +40,9 @@
"vuex": "^3.5.1",
"xml2json": "^0.12.0",
"youtube-chat": "^1.1.0",
"youtube-comments-fetch": "^1.0.1",
"youtube-comments-task": "^1.3.15",
"youtube-suggest": "^1.1.0",
"yt-channel-info": "^1.1.2",
"yt-comment-scraper": "git+https://github.com/PrestonN/yt-comment-scraper.git",
"yt-dash-manifest-generator": "^1.1.0",
"yt-trending-scraper": "^1.0.3",
"yt-xml2vtt": "^1.1.2",

View File

@ -48,6 +48,7 @@
.commentDate {
font-weight: normal;
margin-left: 5px;
font-size: 12px;
}
.commentLikeCount {
@ -58,8 +59,7 @@
.commentMoreReplies {
font-size: 11px;
margin-left: 120px;
margin-top: -25px;
margin-left: 5px;
text-decoration: underline;
cursor: pointer;
color: var(--title-color);

View File

@ -2,7 +2,7 @@ import Vue from 'vue'
import { mapActions } from 'vuex'
import FtCard from '../ft-card/ft-card.vue'
import FtLoader from '../../components/ft-loader/ft-loader.vue'
// import ytcs from 'yt-comment-scraper'
import CommentScraper from 'yt-comment-scraper'
export default Vue.extend({
name: 'WatchVideoComments',
@ -20,6 +20,7 @@ export default Vue.extend({
return {
isLoading: false,
showComments: false,
commentScraper: null,
nextPageToken: null,
commentData: []
}
@ -55,6 +56,7 @@ export default Vue.extend({
this.showToast({
message: this.$t('Comments.There are no more comments for this video')
})
this.getCommentData()
} else {
this.getCommentData()
}
@ -76,49 +78,53 @@ export default Vue.extend({
},
getCommentDataLocal: function () {
console.log('Getting comment data please wait..')
this.showToast({
message: 'Comments through the local API are temporarily disabled'
})
if (this.backendFallback && this.backendPreference === 'local') {
this.showToast({
message: this.$t('Falling back to Invidious API')
})
this.getCommentDataInvidious()
} else {
this.isLoading = false
if (this.commentScraper === null) {
this.commentScraper = new CommentScraper(false)
}
// ytcs.scrape_next_page_youtube_comments(this.id).then((response) => {
// console.log(response)
// const commentData = response.comments.map((comment) => {
// comment.showReplies = false
// comment.dataType = 'local'
//
// return comment
// })
// console.log(commentData)
// this.commentData = this.commentData.concat(commentData)
// this.isLoading = false
// this.showComments = true
// }).catch((err) => {
// console.log(err)
// const errorMessage = this.$t('Local API Error (Click to copy)')
// this.showToast({
// message: `${errorMessage}: ${err}`,
// time: 10000,
// action: () => {
// navigator.clipboard.writeText(err)
// }
// })
// if (this.backendFallback && this.backendPreference === 'local') {
// this.showToast({
// message: this.$t('Falling back to Invidious API')
// })
// this.getCommentDataInvidious()
// } else {
// this.isLoading = false
// }
// })
this.commentScraper.scrape_next_page_youtube_comments(this.id).then((response) => {
console.log(response)
const commentData = response.map((comment) => {
comment.showReplies = false
comment.dataType = 'local'
this.toLocalePublicationString({
publishText: (comment.time + 'ago'),
templateString: this.$t('Video.Publicationtemplate'),
timeStrings: this.$t('Video.Published'),
liveStreamString: this.$t('Video.Watching'),
upcomingString: this.$t('Video.Published.Upcoming'),
isLive: false,
isUpcoming: false,
isRSS: false
}).then((data) => {
comment.time = data
}).catch((error) => {
console.error(error)
})
return comment
})
this.commentData = this.commentData.concat(commentData)
this.isLoading = false
this.showComments = true
this.nextPageToken = ''
}).catch((err) => {
console.log(err)
const errorMessage = this.$t('Local API Error (Click to copy)')
this.showToast({
message: `${errorMessage}: ${err}`,
time: 10000,
action: () => {
navigator.clipboard.writeText(err)
}
})
if (this.backendFallback && this.backendPreference === 'local') {
this.showToast({
message: this.$t('Falling back to Invidious API')
})
this.getCommentDataInvidious()
} else {
this.isLoading = false
}
})
},
getCommentDataInvidious: function () {
@ -138,7 +144,6 @@ export default Vue.extend({
comment.authorThumb = comment.authorThumbnails[1].url
comment.likes = comment.likeCount
comment.text = comment.content
comment.date = comment.publishedText
comment.dataType = 'invidious'
if (typeof (comment.replies) !== 'undefined' && typeof (comment.replies.replyCount) !== 'undefined') {
@ -151,6 +156,8 @@ export default Vue.extend({
comment.replies = []
comment.time = comment.publishedText
return comment
})
@ -201,7 +208,7 @@ export default Vue.extend({
comment.authorThumb = comment.authorThumbnails[1].url
comment.likes = comment.likeCount
comment.text = comment.content
comment.date = comment.publishedText
comment.time = comment.publishedText
comment.dataType = 'invidious'
comment.numReplies = 0
comment.replyContinuation = ''
@ -231,6 +238,7 @@ export default Vue.extend({
...mapActions([
'showToast',
'toLocalePublicationString',
'invidiousAPICall'
])
}

View File

@ -54,17 +54,17 @@
icon="thumbs-up"
/>
{{ comment.likes }}
</p>
<p
v-if="comment.numReplies > 0"
class="commentMoreReplies"
@click="getCommentReplies(index)"
>
<span v-if="!comment.showReplies">{{ $t("Comments.View") }}</span>
<span v-else>{{ $t("Comments.Hide") }}</span>
{{ comment.numReplies }}
<span v-if="comment.numReplies === 1">{{ $t("Comments.Reply").toLowerCase() }}</span>
<span v-else>{{ $t("Comments.Replies").toLowerCase() }}</span>
<span
v-if="comment.numReplies > 0"
class="commentMoreReplies"
@click="getCommentReplies(index)"
>
<span v-if="!comment.showReplies">{{ $t("Comments.View") }}</span>
<span v-else>{{ $t("Comments.Hide") }}</span>
{{ comment.numReplies }}
<span v-if="comment.numReplies === 1">{{ $t("Comments.Reply").toLowerCase() }}</span>
<span v-else>{{ $t("Comments.Replies").toLowerCase() }}</span>
</span>
</p>
<div
v-if="comment.showReplies"