@unavatar/core 3.45.1 → 3.45.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/bin/index.js +10 -1
- package/package.json +1 -1
- package/src/providers/index.js +3 -3
- package/src/providers/douban.js +0 -15
package/bin/index.js
CHANGED
|
@@ -154,7 +154,16 @@ module.exports = ({ baseUrl }) => {
|
|
|
154
154
|
})
|
|
155
155
|
.then(({ buffer, imageUrl }) => {
|
|
156
156
|
console.error()
|
|
157
|
-
|
|
157
|
+
try {
|
|
158
|
+
console.error(
|
|
159
|
+
termImg(buffer, {
|
|
160
|
+
width: '15%',
|
|
161
|
+
fallback: () => imageUrl
|
|
162
|
+
})
|
|
163
|
+
)
|
|
164
|
+
} catch (_) {
|
|
165
|
+
console.error(`Avatar preview unavailable. URL: ${imageUrl}`)
|
|
166
|
+
}
|
|
158
167
|
|
|
159
168
|
console.error(`
|
|
160
169
|
input: ${apiUrl.toString()}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@unavatar/core",
|
|
3
3
|
"description": "Get unified user avatar from social networks, including Instagram, SoundCloud, Telegram, Twitter, YouTube & more.",
|
|
4
4
|
"homepage": "https://unavatar.io",
|
|
5
|
-
"version": "3.45.
|
|
5
|
+
"version": "3.45.3",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./src/index.js",
|
package/src/providers/index.js
CHANGED
|
@@ -17,7 +17,6 @@ const providersBy = {
|
|
|
17
17
|
'deviantart',
|
|
18
18
|
'discord',
|
|
19
19
|
'dockerhub',
|
|
20
|
-
'douban',
|
|
21
20
|
'dribbble',
|
|
22
21
|
'facebook',
|
|
23
22
|
'flickr',
|
|
@@ -44,6 +43,7 @@ const providersBy = {
|
|
|
44
43
|
'primal',
|
|
45
44
|
'producthunt',
|
|
46
45
|
'psnprofiles',
|
|
46
|
+
'qq',
|
|
47
47
|
'raycast',
|
|
48
48
|
'reddit',
|
|
49
49
|
'revolut',
|
|
@@ -65,13 +65,14 @@ const providersBy = {
|
|
|
65
65
|
'venmo',
|
|
66
66
|
'vimeo',
|
|
67
67
|
'weibo',
|
|
68
|
+
'whatsapp',
|
|
68
69
|
'wise',
|
|
69
70
|
'x',
|
|
70
71
|
'xboxgamertag',
|
|
71
72
|
'youtube',
|
|
72
73
|
'zhihu'
|
|
73
74
|
],
|
|
74
|
-
domain: ['microlink']
|
|
75
|
+
domain: ['duckduckgo', 'google', 'microlink']
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
module.exports = ctx => {
|
|
@@ -90,7 +91,6 @@ module.exports = ctx => {
|
|
|
90
91
|
deviantart: require('./deviantart')(ctx),
|
|
91
92
|
discord: require('./discord')(ctx),
|
|
92
93
|
dockerhub: require('./dockerhub')(ctx),
|
|
93
|
-
douban: require('./douban')(ctx),
|
|
94
94
|
dribbble: require('./dribbble')(ctx),
|
|
95
95
|
duckduckgo: require('./duckduckgo')(ctx),
|
|
96
96
|
facebook: require('./facebook')(ctx),
|
package/src/providers/douban.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const getAvatarUrl = input => `https://www.douban.com/people/${input}/`
|
|
4
|
-
|
|
5
|
-
const getAvatar = $ => $('img.userface').attr('src')
|
|
6
|
-
|
|
7
|
-
module.exports = ({ createHtmlProvider }) =>
|
|
8
|
-
createHtmlProvider({
|
|
9
|
-
name: 'douban',
|
|
10
|
-
url: getAvatarUrl,
|
|
11
|
-
getter: getAvatar
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
module.exports.getAvatarUrl = getAvatarUrl
|
|
15
|
-
module.exports.getAvatar = getAvatar
|