🧠 While building some production scrapers, I kept running into the same pain: certain sites would reject or challenge every request, no matter how well I spoofed headers or user-agents. After a few rounds of frustration (and way too many failed Axios requests), I realized the only stable way was curl-impersonate --- but using it cleanly inside Node.js wasn’t great. So I wrapped it. Introducing cuimp --- a minimal Node.js wrapper around curl-impersonate. It lets you send requests that actually behave like real browsers --- Chrome, Safari, Firefox --- and just work where others fail. I originally wrote it for my own automation stack, but figured it might help others too. If you build crawlers, data extractors, or automation tools, this might save you a few headaches. 👉 https://lnkd.in/ebpZXxdc 💡 Open to contributions and feedback: 👉 https://lnkd.in/ed6MWznB
Introducing cuimp: A Node.js wrapper for curl-impersonate
More Relevant Posts
-
🎥 Just recorded a small experiment where two web browsers talk directly to each other — no server, no backend — just pure WebRTC magic happening inside the DevTools console. ⚡️ What’s happening under the hood? It’s all UDP packets flying directly between peers, carrying real-time data through a secure, peer-to-peer tunnel. This protocol is one of the most exciting parts of modern web engineering — lightweight, encrypted, and incredibly fast. It’s what powers Google Meet, Discord, and countless real-time apps, and yet it’s simple enough to test manually in your own browser. I built this little demo to understand the full WebRTC handshake — offers, answers, and ICE candidates — without relying on any signaling server. Watching the packets connect, and seeing messages appear instantly between two tabs, was honestly fun 😄 🔗 Check out the code and explanation on my GitHub: 👉 https://lnkd.in/e9Vz963N #WebRTC #WebDevelopment #Networking #JavaScript #PeerToPeer #UDP #RealTime #DeveloperJourney
To view or add a comment, sign in
-
It seems like most of the LLM providers now support fetching stuff directly from the web. An experiment I've tried a couple of times recently with really good results is to paste in a specific URL related to the prompt/task I'm asking the LLM to do. - In one case, I handed Cursor the URL of a blog post that walked through how to do something very similar (but not exact) to what I needed to do. It was a tedious, but involved refactor to integrate Cloudflare Turnstile into a Next.js app. Using my 2-sentence prompt and then reading the blog post, it perfectly implemented the integration. - Similarly, I asked Claude to write a script using a specific NPM tool/API that is pretty new (ScriptKit) for a local automation I wanted to set up. ScriptKit might not be in its training data or if it is, there is probably relatively little on the internet about it. So I included the URL to the docs and that helped it write a functioning script on the first try.
To view or add a comment, sign in
-
Here's a sarcastic and ironic response to your code snippet: ```sql Yo, get ready for some FCM token hell! 🤖 Your code is hanging like a string of static HTML, never executing that pesky `getTokenWithChromeDetection()` function. It's like trying to navigate a land of emojis and special characters, but the browser's default behavior is to block all of them. 🤯 Let me explain the issue. The `navigator.userAgent` and `navigator.vendor` properties in your code seem to be checking for a Chrome browser. However, the `isChrome` variable returns `true` only if the user's browser is a Chrome browser with the Google Inc. renderer. This means your code might not be working if the user's browser is a non-Chrome browser, such as Firefox or Safari. To troubleshoot this issue, try the following steps: 1. Clear your browser cache and cookies: Sometimes, clearing the browser cache and cookies can help resolve issues with caching and local storage. You can follow these steps: ```bash $ rm -rf ~/.cache | xargs -I {} npm cache clean --force ``` This command will remove the browser's cache and cookies, and then reinstall them. After clearing the
To view or add a comment, sign in
-
<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false" data-babel-preset-react="false" data-babel-preset-ts="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>StackSnippets.net is a website that refuses to connect to your browser for some strange reason. But don't worry, it's not just a glitch in your internet connection. It's a deliberate attempt to punish you for using Chromium browsers, as it detects them as potentially malicious and blocks them from accessing certain websites. So, how did StackSnippets.net even get the idea of blocking you? It's because of the "X-Frame-Options" header. This header is used by websites to specify whether they should allow or deny the display of a specific frame to another website. In the case of StackSnippets.net, they set it to "sameorigin," which means that if you visit a website on their site using a different browser, like Firefox, they will be blocked from displaying the page in a frame. This is a clever move by StackSnippets.net, as it's not just a website that's trying to prevent you from using
To view or add a comment, sign in
-
Is your website slow, and you want to understand why? Here’s how the PerformanceObserver API can help you 👇 1. What is the PerformanceObserver API? The PerformanceObserver API allows you to monitor your website's performance directly in your code. It observes performance events in real time: - resources, - user interactions, - page loading. 2. Why use it? Browser tools are limited to manual testing. This API collects real user data and enables dynamic optimizations. 3. A concrete example Listen to "resource" events. Then, identify images that take more than 500ms to load. Next, adjust your site to reduce those loading times. 4. Browser support This API is supported by all major browsers (Chrome, Firefox, Safari, and Edge), covering 94.93% of users. 5. In summary You move from manual debugging to automated data collection. It's the best way to ensure optimal performance. Have you already used PerformanceObserver? Share your experience in the comments!
To view or add a comment, sign in
-
-
🚨 Ever faced this error? "Access to fetch at 'https://api.example.com' has been blocked by CORS policy" Your code looks fine. Backend works. Frontend compiles. Still stuck? 😵 That’s CORS (Cross-Origin Resource Sharing) at work! In my latest blog, I break down: 🔹 What CORS is & why browsers enforce it 🔹 Preflight requests (OPTIONS) explained simply 🔹 How React’s proxy helps in local dev 🔹 Fixing CORS properly in production (backend configs, proxies, API gateways) 🔹 Best practices & common pitfalls 👉 Whether you’re a frontend dev calling APIs or a backend dev writing them, understanding CORS saves hours of debugging. Let’s discuss in comments 👇 – have you ever encountered a tricky CORS issue?
To view or add a comment, sign in
-
🚀 New Blog: useSyncExternalStore in React? React 18 introduced this powerful hook to safely subscribe to external data sources like browser events, localStorage, or global stores — without risking stale state or inconsistent renders. In my latest post, I explain what it is, how it works, and share a real-world example tracking online/offline status using this API. Read here 👉 https://lnkd.in/gpPf4E5a #ReactJS #WebDevelopment #ReactHooks #JavaScript
To view or add a comment, sign in
-
The latest article by Ankur Agarwal dives into how the Grafana k6 browser enhances frontend testing by capturing vital data from a user perspective. I found it interesting that it allows for detailed metrics and user simulations, which can significantly improve understanding of performance issues. How do you integrate user-centric testing in your projects?
To view or add a comment, sign in
-
Inspect and modify mobile browser cookies directly using Chrome DevTools! 📱🐞 . . . Here’s how you can do it too — step-by-step: ✅ How to Inspect & Debug Cookies on Mobile Using Chrome DevTools 1. Enable Developer Options on Mobile • Go to Settings > Developer Options → Enable USB Debugging 2. Connect Mobile to PC via USB 3. Open Chrome on PC and Visit chrome://inspect/#devices You’ll see your connected mobile device and open browser tabs. 4. Open the Website/App on Chrome Mobile that you want to debug. 5. On PC → Click “Inspect” under the mobile tab you want to debug. A Chrome DevTools window opens, mirroring your mobile browser. 6. Go to the Application Tab in DevTools • Expand Storage > Cookies • Select the relevant domain • Inspect, edit, or delete cookies in real time. 7. Modify Cookies as Needed Test domain issues, security attributes, SameSite flags, or path mismatches — and instantly see the changes reflected on your mobile browser. 💡 Why This Matters With mobile traffic dominating the web and cookie policies becoming stricter (SameSite, Secure, HttpOnly, etc.), debugging cookies directly on mobile is no longer optional — it’s essential. This approach helped me catch a domain mismatch that would’ve been impossible to find through desktop-only testing. 💬 Have you dealt with weird cookie issues on mobile too? Drop your story or tips below — let’s make debugging easier for everyone! #WebDevelopment #MobileDebugging #ChromeDevTools #Cookies #TechTips #WebSecurity #MobileFirst #SoftwareEngineering #DevTools
To view or add a comment, sign in
-
-
I learned something cool in TypeScript: variadic tuples. The use case for this is forwarding asynchronous function calls to React useEffect and forwarding dependencies to create a custom hook like so: export default function useAsyncFetch<R, T extends unknown[]>(func: (...args: [...T]) => Promise<R>, args: readonly [...T], initial: R): R { const [result, setResult] = useState(initial) useEffect(() => { const fetchResult = async () => { const result = await func(...args) setResult(result) } fetchResult() return () => {} }, [func, ...args]) return result } The reason this is necessary is because `use(awaitable)` inside a client component causes rendering issues due to https://lnkd.in/gFZnT9VZ . useState and useEffect does work but that combination should be its own hook and to get TypeScript's type inference working as desired, here we are. NOTE: if func is a Promise generated during a render, there will be an infinite render loop. Hoist the Promise out of any rendering blocks or remove func from the useEffect dependencies (meaning functional currying needs to be done with a bit more nuance).
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development