Skip to content

Commit cb68fda

Browse files
authored
Fix: Getting Perplexity non-link sources in the sources list (#252)
* docs: notes * fix: Perplexity content selector * fix: Perplexity - wait for the Youtube frame to appear to catch the link * 3.7.6
1 parent c2e1090 commit cb68fda

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "save-my-chatbot",
3-
"version": "3.7.5",
3+
"version": "3.7.6",
44
"license": "RMD-C 1.1",
55
"author": "Hugo COLLIN",
66
"homepage": "https://save.hugocollin.com",

public/files/updateNotes.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Update notes
2+
# 3.7.6
3+
🎯 Fix Perplexity sources list export
4+
Some sources were not correctly exported. It's now fixed!
5+
26
# 3.7.5
3-
🐞 Sorry for the mess
4-
These days, the download was buggy and required extra download permissions.
5-
I really apologize and I hope it didn't bother you too much.
7+
🐞 Fixing the download bugs
8+
These days, the download was a bit buggy for some users.
9+
I hope it didn't bother you too much.
610
It's now fixed and you can download your files as usual!
711

812
# 3.7.4

src/core/services/pageExtractor/extractSources.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {safeExecute, sleep} from "../../utils/jsShorteners";
22
import {resetPagination, selectAndClick} from "../interact/cs/interact";
33
import {formatLink} from "../format/formatMarkdown";
4+
import {waitAppears} from "../../utils/cs/interactDOM";
45

56
const SOURCES_HEADER = "\n\n---\n**Sources:**\n";
67
let res = "";
@@ -187,7 +188,7 @@ export async function formatSources(i: string | number, format: (arg0: any) => s
187188
await sleep(500); // needed for youtube player to load
188189

189190
// Get the youtube embed
190-
const link = document.querySelector('.fixed iframe');
191+
const link = await waitAppears('.fixed iframe', 100, 10) as HTMLElement;
191192

192193
if (!link) {
193194
console.warn("link undefined");

src/features/scraper/domains/Perplexity.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"wait": 50
4141
}],
4242
"close": [{"selector": "[data-testid=\"close-modal\"], div.w-full.relative button[aria-label].h-8:not([aria-label=\"Submit\"])", "scope": "document", "wait": 50}],
43-
"selector": ".fixed > div > [class] > div > div > div > div > div > .group, div.w-full.relative > .h-full.items-stretch.cursor-pointer.w-full.flex.group",
43+
"selector": ".fixed > div > [class] > div > div > div > div > div > .group, div.w-full.relative > .group",
4444
"extractionType": "list"
4545
},
4646
{

0 commit comments

Comments
 (0)