Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Fix return value of yt scraping
Browse files Browse the repository at this point in the history
  • Loading branch information
jfilter committed Mar 22, 2023
1 parent 53aa38d commit 3dd77d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/strange-parents-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@algorithmwatch/harke-scraper": patch
---

Fix return value
4 changes: 3 additions & 1 deletion packages/harke-scraper/src/scrape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const scrapeYouTubeVideos = async (
options: any,
logFun = console.log,
): Promise<any> => {
return scrapeItems(
const items = await scrapeItems(
videoUrls,
{},
options,
Expand All @@ -27,5 +27,7 @@ const scrapeYouTubeVideos = async (
parseFun,
undefined,
);
// The cache is in items[1]
return items[0];
};
export { scrapeYouTubeVideos };

0 comments on commit 3dd77d4

Please sign in to comment.