@zenaveline/scraper 1.2.2 → 1.3.3
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/README.md +4 -3
- package/package.json +2 -1
- package/src/spotifycard.js +1 -1
package/README.md
CHANGED
|
@@ -49,10 +49,11 @@ console.log(data) // output
|
|
|
49
49
|
Untuk project standar Node.js (seperti bot WhatsApp pada umumnya):
|
|
50
50
|
|
|
51
51
|
```javascript
|
|
52
|
-
const scraper = require(
|
|
52
|
+
const scraper = require("@zenaveline/scraper")
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
console.log
|
|
54
|
+
scraper.bypasstools("url")
|
|
55
|
+
.then(console.log)
|
|
56
|
+
.catch(console.error)
|
|
56
57
|
```
|
|
57
58
|
|
|
58
59
|
### 🎶 Khusus Penggunaan Spotify API
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenaveline/scraper",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "Kumpulan scraper yang mudah digunakan!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"@zenaveline/scraper",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"author": "Zenaveline",
|
|
22
22
|
"license": "ISC",
|
|
23
23
|
"dependencies": {
|
|
24
|
+
"@zenaveline/scraper": "^1.2.2",
|
|
24
25
|
"axios": "^1.6.0",
|
|
25
26
|
"cheerio": "^1.0.0",
|
|
26
27
|
"crypto": "^1.0.1",
|
package/src/spotifycard.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const sharp = require('sharp')
|
|
2
1
|
const axios = require('axios')
|
|
3
2
|
|
|
4
3
|
async function loadImageFromURL(url) {
|
|
@@ -47,6 +46,7 @@ const escapeXml = (unsafe) => (unsafe || "").replace(/[<>&'"]/g, c => {
|
|
|
47
46
|
|
|
48
47
|
|
|
49
48
|
async function drawCardSpotify({ bg, cover, title, artist }) {
|
|
49
|
+
const sharp = require('sharp')
|
|
50
50
|
const width = 320;
|
|
51
51
|
const height = 420;
|
|
52
52
|
const cardX = 20;
|