feat: Facebook page data collection via Apify scraper
- enrich-channels: add Facebook Pages Scraper (apify~facebook-pages-scraper) - Collects: pageName, followers, likes, categories, email, phone, website, intro, rating - transformReport: merge Facebook data into facebookAudit.pages[] (auto-shows section) - Frontend: pass facebookHandle through enrichment pipeline - EnrichChannelsRequest: add facebookHandle parameter Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ad625e08ee
commit
a7d8aeeddc
5 files changed
+85
-2
No files matched your search
@@ -16,6 +16,7 @@ interface EnrichmentParams {
|
||||
instagramHandle?: string;
|
||||
instagramHandles?: string[];
|
||||
youtubeChannelId?: string;
|
||||
facebookHandle?: string;
|
||||
address?: string;
|
||||
}
|
||||
|
||||
@@ -45,6 +46,7 @@ export function useEnrichment(
|
||||
instagramHandle: params.instagramHandle,
|
||||
instagramHandles: params.instagramHandles,
|
||||
youtubeChannelId: params.youtubeChannelId,
|
||||
facebookHandle: params.facebookHandle,
|
||||
address: params.address,
|
||||
})
|
||||
.then((result) => {
|
||||
|
||||
@@ -39,6 +39,7 @@ export interface EnrichChannelsRequest {
|
||||
instagramHandle?: string;
|
||||
instagramHandles?: string[];
|
||||
youtubeChannelId?: string;
|
||||
facebookHandle?: string;
|
||||
address?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -439,6 +439,20 @@ export interface EnrichmentData {
|
||||
mapx?: string;
|
||||
mapy?: string;
|
||||
};
|
||||
facebook?: {
|
||||
pageName?: string;
|
||||
pageUrl?: string;
|
||||
followers?: number;
|
||||
likes?: number;
|
||||
categories?: string[];
|
||||
email?: string;
|
||||
phone?: string;
|
||||
website?: string;
|
||||
address?: string;
|
||||
intro?: string;
|
||||
rating?: number;
|
||||
profilePictureUrl?: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -616,6 +630,31 @@ export function mergeEnrichment(
|
||||
}
|
||||
}
|
||||
|
||||
// Facebook enrichment
|
||||
if (enrichment.facebook) {
|
||||
const fb = enrichment.facebook;
|
||||
merged.facebookAudit = {
|
||||
...merged.facebookAudit,
|
||||
pages: [{
|
||||
url: fb.pageUrl || '',
|
||||
pageName: fb.pageName || '',
|
||||
language: 'KR',
|
||||
label: '메인',
|
||||
followers: fb.followers ?? 0,
|
||||
following: 0,
|
||||
category: fb.categories?.join(', ') || '',
|
||||
bio: fb.intro || '',
|
||||
logo: '',
|
||||
logoDescription: '',
|
||||
link: fb.website || '',
|
||||
linkedDomain: fb.website || '',
|
||||
reviews: 0,
|
||||
recentPostAge: '',
|
||||
hasWhatsApp: false,
|
||||
}],
|
||||
};
|
||||
}
|
||||
|
||||
// 네이버 블로그 enrichment
|
||||
if (enrichment.naverBlog) {
|
||||
const nb = enrichment.naverBlog;
|
||||
|
||||
@@ -63,11 +63,14 @@ export default function ReportPage() {
|
||||
baseData.youtubeAudit?.handle ||
|
||||
undefined;
|
||||
|
||||
const fbHandle = handles?.facebook || undefined;
|
||||
|
||||
return {
|
||||
reportId: baseData.id,
|
||||
clinicName: baseData.clinicSnapshot.name,
|
||||
instagramHandles: igHandles.length > 0 ? igHandles : undefined,
|
||||
youtubeChannelId: ytHandle || undefined,
|
||||
facebookHandle: fbHandle as string | undefined,
|
||||
address: baseData.clinicSnapshot.location || undefined,
|
||||
};
|
||||
}, [baseData, isEnriched, dbSocialHandles, location.state]);
|
||||
|
||||
Reference in new issue
Block a user