<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Labs Studio</title>
    <description>The latest articles on DEV Community by Labs Studio (@labs_studio_6f9b8e9598fd2).</description>
    <link>https://dev.to/labs_studio_6f9b8e9598fd2</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3916958%2F03ef0f47-5aac-48ef-8743-ccaf2812b76a.png</url>
      <title>DEV Community: Labs Studio</title>
      <link>https://dev.to/labs_studio_6f9b8e9598fd2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/labs_studio_6f9b8e9598fd2"/>
    <language>en</language>
    <item>
      <title>We got tired of broken chromedriver and built our own — with SOCKS5, multiprocessing, and captcha support</title>
      <dc:creator>Labs Studio</dc:creator>
      <pubDate>Thu, 07 May 2026 17:24:35 +0000</pubDate>
      <link>https://dev.to/labs_studio_6f9b8e9598fd2/we-got-tired-of-broken-chromedriver-and-built-our-own-with-socks5-multiprocessing-and-captcha-c19</link>
      <guid>https://dev.to/labs_studio_6f9b8e9598fd2/we-got-tired-of-broken-chromedriver-and-built-our-own-with-socks5-multiprocessing-and-captcha-c19</guid>
      <description>&lt;h2&gt;
  
  
  How it started
&lt;/h2&gt;

&lt;p&gt;We needed web scraping. Simple enough, right? Just grab Selenium and go.&lt;/p&gt;

&lt;p&gt;Except reality had other plans: CloudFlare blocked us within seconds, Chrome couldn't handle SOCKS5 proxies with authentication, and running multiple processes caused them to crash each other.&lt;/p&gt;

&lt;p&gt;We found &lt;code&gt;undetected-chromedriver&lt;/code&gt; — it bypassed bot detection, which was exactly what we needed. But the maintainer had abandoned it, and it was broken in all the places that mattered to us.&lt;/p&gt;

&lt;p&gt;So we decided: let's fork it and fix it ourselves.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we added
&lt;/h2&gt;

&lt;h3&gt;
  
  
  SOCKS5 with authentication
&lt;/h3&gt;

&lt;p&gt;Chrome doesn't natively support SOCKS5 proxies that require login credentials. Our solution: spin up a local proxy server inside the library itself. Chrome thinks it's talking to &lt;code&gt;localhost&lt;/code&gt; with no auth — our proxy quietly adds the credentials and forwards everything.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;driver&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;uc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Chrome&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;proxy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;host&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;1.2.3.4&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;port&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1080&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my_login&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pass&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my_password&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Multiprocessing without headaches
&lt;/h3&gt;

&lt;p&gt;The original library with multiple workers was like one bathroom shared by the entire apartment building — everyone fighting for the same door. Each new process restarted chromedriver, crashing all previous workers.&lt;/p&gt;

&lt;p&gt;Our fix: one master (patched) copy of the driver exists, and each worker gets its own isolated copy. When the worker finishes, the copy is deleted. We also added inter-process locking — 100 workers won't trigger 100 driver downloads.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;multiprocessing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Pool&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;rtfox_browser&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;uc&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;run_worker&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;worker_id&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;driver&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;uc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Chrome&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;worker_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;worker_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;proxy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{...})&lt;/span&gt;
    &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://example.com&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;quit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nc"&gt;Pool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;pool&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;run_worker&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;w1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;w2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;w3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;w4&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Captcha module — just drop a file in a folder
&lt;/h3&gt;

&lt;p&gt;We wanted a system where adding new solvers required zero changes to the library itself. The result: write a class, drop the &lt;code&gt;.py&lt;/code&gt; file into the &lt;code&gt;solvers/&lt;/code&gt; folder, and the method automatically appears in &lt;code&gt;CaptchaService&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;captcha&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;CaptchaService&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;captcha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;available&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;  &lt;span class="c1"&gt;# ['ebay_hcaptcha', 'aws_image']
&lt;/span&gt;&lt;span class="n"&gt;captcha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ebay_hcaptcha&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;Three problems, three solutions. The library is called &lt;strong&gt;rtfox-browser&lt;/strong&gt; and it's available on PyPI:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pip install rtfox-browser&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you're into scraping and have run into the same walls — give it a try. Feedback is very welcome!&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🔗 GitHub: &lt;a href="https://github.com/rtf-labs-studio/rtfox-browser" rel="noopener noreferrer"&gt;rtf-labs-studio/rtfox-browser&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🦊 GitLab (main): &lt;a href="https://gitlab.com/rtf-labs-studio/rtfox-browser" rel="noopener noreferrer"&gt;rtf-labs-studio/rtfox-browser&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📦 PyPI: &lt;a href="https://pypi.org/project/rtfox-browser/" rel="noopener noreferrer"&gt;rtfox-browser&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💬 Telegram: &lt;a href="https://t.me/rtf_labs_studio" rel="noopener noreferrer"&gt;rtf_labs_studio&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🎥 YouTube: &lt;a href="https://www.youtube.com/@RTF_Labs_Studio" rel="noopener noreferrer"&gt;RTF_Labs_Studio&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>programming</category>
      <category>python</category>
      <category>selenium</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
