media-scraper
Version:
TypeScript-first multi-platform social media scraper without API keys
30 lines (29 loc) • 747 B
TypeScript
import type { GenericAuthorObject } from "../types";
declare const _default: (url: string) => Promise<ThreadsMedia>;
export default _default;
interface ThreadsMedia {
id: string;
pk: string;
code: string;
caption?: string;
permalink_url: string;
author: GenericAuthorObject;
likes_count?: number;
created_at?: number;
image_versions?: ThreadsImageVersion[];
video_versions?: ThreadsVideoVersion[];
carousel_media?: {
id: string;
image_versions?: ThreadsImageVersion[];
video_versions?: ThreadsVideoVersion[];
}[];
}
interface ThreadsImageVersion {
width: number;
height: number;
url: string;
}
interface ThreadsVideoVersion {
type: number;
url: string;
}