Spaces:
Paused
Paused
Download src/scraper/WebScraper/utils/removeBase64Images.ts from Echo-AI-official/Fire-crawl: direct link, hf CLI and curl.
- Browser
- Download file 215 Bytes
-
https://huggingface.co/spaces/Echo-AI-official/Fire-crawl/resolve/main/src/scraper/WebScraper/utils/removeBase64Images.ts
- Command line
-
hf download hf://spaces/Echo-AI-official/Fire-crawl/src/scraper/WebScraper/utils/removeBase64Images.ts
-
curl -L -o removeBase64Images.ts https://huggingface.co/spaces/Echo-AI-official/Fire-crawl/resolve/main/src/scraper/WebScraper/utils/removeBase64Images.ts
215 Bytes
| export const removeBase64Images = async (markdown: string) => { | |
| const regex = /(!\[.*?\])\(data:image\/.*?;base64,.*?\)/g; | |
| markdown = markdown.replace(regex, "$1(<Base64-Image-Removed>)"); | |
| return markdown; | |
| }; | |