chrome_options</span><span class="o">.</span><span class="n">binary_location</span> <span class="o">=</span> <span class="n">chrome_path</span>
    <span class="k">if</span> <span class="n">chromedriver_path</span><span class="p">:</span>
        <span class="n">s</span> <span class="o">=</span> <span class="n">Service</span><span class="p">(</span><span class="n">chromedriver_path</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">webdriver</span><span class="o">.</span><s