mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 11:42:24 +08:00
fixed markdown format
This commit is contained in:
parent
aabfaf0ac5
commit
086ba6280b
|
@ -9,13 +9,12 @@ import { scrapeQueueEvents } from '../../services/queue-service';
|
|||
import { logJob } from "../../services/logging/log_job";
|
||||
|
||||
export async function scrapeController(req: RequestWithAuth<{}, ScrapeResponse, ScrapeRequest>, res: Response<ScrapeResponse>) {
|
||||
req.body = scrapeRequestSchema.parse(req.body);
|
||||
req.body = scrapeRequestSchema.parse(req.body);
|
||||
let earlyReturn = false;
|
||||
|
||||
const origin = req.body.origin;
|
||||
const timeout = req.body.timeout;
|
||||
const pageOptions = legacyScrapeOptions(req.body);
|
||||
|
||||
const jobId = uuidv4();
|
||||
|
||||
const startTime = new Date().getTime();
|
||||
|
|
|
@ -293,7 +293,10 @@ export class WebScraperDataProvider {
|
|||
documents = await this.getSitemapData(this.urls[0], documents);
|
||||
}
|
||||
|
||||
documents = this.applyPathReplacements(documents);
|
||||
if (this.pageOptions.includeMarkdown) {
|
||||
documents = this.applyPathReplacements(documents);
|
||||
}
|
||||
|
||||
// documents = await this.applyImgAltText(documents);
|
||||
if (
|
||||
(this.extractorOptions.mode === "llm-extraction" ||
|
||||
|
|
|
@ -14,12 +14,12 @@ export async function fireEngineSearch(q: string, options: {
|
|||
page?: number;
|
||||
}): Promise<SearchResult[]> {
|
||||
let data = JSON.stringify({
|
||||
q: q,
|
||||
query: q,
|
||||
lang: options.lang,
|
||||
country: options.country,
|
||||
location: options.location,
|
||||
tbs: options.tbs,
|
||||
num: options.numResults,
|
||||
numResults: options.numResults,
|
||||
page: options.page ?? 1,
|
||||
});
|
||||
|
||||
|
@ -36,7 +36,7 @@ export async function fireEngineSearch(q: string, options: {
|
|||
data: data,
|
||||
};
|
||||
const response = await axios(config);
|
||||
if (response && response.data) {
|
||||
if (response && response) {
|
||||
return response.data
|
||||
} else {
|
||||
return [];
|
||||
|
|
Loading…
Reference in New Issue
Block a user