We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3da0ca4 commit ebf7fd7Copy full SHA for ebf7fd7
src/commands/FetchPreview.ts
@@ -34,14 +34,23 @@ export default class FetchPreview extends BaseCommand {
34
url = $(`img`).attr("src");
35
}
36
37
+ let title = $(`title`).text();
38
+
39
+ let description = $(`meta[name=description]`).attr("content") || $(`meta[property=og\\:description]`).attr("content");
40
41
const file = await TempFileService.getTempFile(".jpg");
42
await TempFileService.fetch(url, file.path);
43
44
await this.upload({ url: output , filePath: file.path});
45
46
return {
47
statusCode: 200,
- body: JSON.stringify(url),
48
+ body: JSON.stringify({
49
+ url,
50
+ title,
51
+ description,
52
+ none
53
+ }),
54
headers: {
55
"content-type": "application/json"
56
0 commit comments