UNPKG

undetected-chromedriver-js

Version:

Node.js wrapper for undetected-chromedriver with automatic setup and cross-platform support

27 lines (21 loc) โ€ข 733 B
const fs = require('fs'); const path = require('path'); function removeDir(dirPath) { if (fs.existsSync(dirPath)) { fs.rmSync(dirPath, { recursive: true, force: true }); console.log(`โœ“ Removed ${dirPath}`); } } function removeFile(filePath) { if (fs.existsSync(filePath)) { fs.unlinkSync(filePath); console.log(`โœ“ Removed ${filePath}`); } } console.log('๐Ÿงน Cleaning up undetected-chromedriver-js...'); // Remove virtual environment removeDir(path.join(process.cwd(), '.venv')); // Remove generated files removeFile(path.join(process.cwd(), 'chromedriver_path.txt')); removeFile(path.join(__dirname, 'generate_executable.py')); console.log('โœ… Cleanup completed. Run npm run setup to reinstall.');