Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/extractors/chatgpt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export class ChatGPTExtractor extends ConversationExtractor {
private footnoteCounter: number;
private cachedMessages: ConversationMessage[] | null = null;

constructor(document: Document, url: string) {
super(document, url);
constructor(document: Document, url: string, schemaOrgData?: any, options?: any) {
super(document, url, schemaOrgData, options);
this.turns = document.querySelectorAll('[data-testid^="conversation-turn-"]');
this.footnotes = [];
this.footnoteCounter = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/extractors/claude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { serializeHTML } from '../utils/dom';
export class ClaudeExtractor extends ConversationExtractor {
private articles: NodeListOf<Element> | null;

constructor(document: Document, url: string) {
super(document, url);
constructor(document: Document, url: string, schemaOrgData?: any, options?: any) {
super(document, url, schemaOrgData, options);
// Find all message blocks - both user and assistant messages
this.articles = document.querySelectorAll('div[data-testid="user-message"], div[data-testid="assistant-message"], div.font-claude-response');
}
Expand Down
4 changes: 2 additions & 2 deletions src/extractors/gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export class GeminiExtractor extends ConversationExtractor {
private footnotes: Footnote[];
private messageCount: number | null = null;

constructor(document: Document, url: string) {
super(document, url);
constructor(document: Document, url: string, schemaOrgData?: any, options?: any) {
super(document, url, schemaOrgData, options);
this.conversationContainers = document.querySelectorAll('div.conversation-container');
this.footnotes = [];
}
Expand Down
4 changes: 2 additions & 2 deletions src/extractors/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export class GitHubExtractor extends BaseExtractor {
private isIssue: boolean;
private isPR: boolean;

constructor(document: Document, url: string) {
super(document, url);
constructor(document: Document, url: string, schemaOrgData?: any, options?: any) {
super(document, url, schemaOrgData, options);
this.isIssue = /\/issues\/\d+/.test(url);
this.isPR = /\/pull\/\d+/.test(url);
}
Expand Down
4 changes: 2 additions & 2 deletions src/extractors/grok.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export class GrokExtractor extends ConversationExtractor {
private footnotes: Footnote[];
private footnoteCounter: number;

constructor(document: Document, url: string) {
super(document, url);
constructor(document: Document, url: string, schemaOrgData?: any, options?: any) {
super(document, url, schemaOrgData, options);
this.messageBubbles = document.querySelectorAll(this.messageContainerSelector);
this.footnotes = [];
this.footnoteCounter = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/extractors/hackernews.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export class HackerNewsExtractor extends BaseExtractor {
private isListingPage: boolean;
private mainComment: Element | null;

constructor(document: Document, url: string) {
super(document, url);
constructor(document: Document, url: string, schemaOrgData?: any, options?: any) {
super(document, url, schemaOrgData, options);
this.mainPost = document.querySelector('.fatitem');
this.isListingPage = this.detectListingPage();
this.isCommentPage = this.detectCommentPage();
Expand Down
4 changes: 2 additions & 2 deletions src/extractors/reddit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export class RedditExtractor extends BaseExtractor {
private shredditPost: Element | null;
private isOldReddit: boolean;

constructor(document: Document, url: string) {
super(document, url);
constructor(document: Document, url: string, schemaOrgData?: any, options?: any) {
super(document, url, schemaOrgData, options);
this.shredditPost = document.querySelector('shreddit-post');
this.isOldReddit = !!document.querySelector('.thing.link');
}
Expand Down
4 changes: 2 additions & 2 deletions src/extractors/twitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export class TwitterExtractor extends BaseExtractor {
private replyTweets: Element[] = [];
private replyDepths: number[] = [];

constructor(document: Document, url: string) {
super(document, url);
constructor(document: Document, url: string, schemaOrgData?: any, options?: any) {
super(document, url, schemaOrgData, options);

// Get all tweets from the timeline
const timeline = Array.from(document.querySelectorAll('[aria-label]'))
Expand Down
4 changes: 2 additions & 2 deletions src/extractors/x-article.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const SELECTORS = {
export class XArticleExtractor extends BaseExtractor {
private articleContainer: Element | null;

constructor(document: Document, url: string, schemaOrgData?: any) {
super(document, url, schemaOrgData);
constructor(document: Document, url: string, schemaOrgData?: any, options?: any) {
super(document, url, schemaOrgData, options);
this.articleContainer = document.querySelector(SELECTORS.ARTICLE_CONTAINER);
}

Expand Down