Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

Improve path

Ondra Urbanb710b068ed8e
diff --git a/src/live_view/index.html b/src/live_view/index.html
index 7e8096456..41a042213 100644
--- a/src/live_view/index.html
+++ b/src/live_view/index.html
@@ -126,9 +126,16 @@
Prism.highlightAll();
}
+ function getSocketIoPath() {
+ const { pathname } = window.location;
+ return pathname.endsWith('/')
+ ? pathname + 'socket.io'
+ : '/socket.io';
+ }
+
function connect() {
const socket = io(window.location.href, {
- path: window.location.pathname
+ path: getSocketIoPath(),
});
socket.on('snapshot', showSnapshot);
socket.on('connect', () => {