Skip to content

Commit 3d64ab6

Browse files
authored
feat: add redirected url to the output metadata (#76)
1 parent 2fc2a69 commit 3d64ab6

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ storage
1313

1414
# Actor run input
1515
input.json
16+
INPUT.json

src/request-handler.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ async function handleContent(
139139
description: $('meta[name=description]').first().attr('content') ?? undefined,
140140
languageCode: $html.first().attr('lang') ?? undefined,
141141
url: request.url,
142+
redirectedUrl: request.loadedUrl,
142143
},
143144
query: request.userData.query,
144145
text: settings.outputFormats.includes('text') ? text : undefined,

src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ export type Output = {
115115
metadata: {
116116
title?: string | null;
117117
url: string;
118+
redirectedUrl?: string | null;
118119
description?: string | null;
119120
author?: string | null;
120121
languageCode?: string | null;

0 commit comments

Comments
 (0)