How to click a link whose href contains some string in Selenium Python?
<p>I want to click on a link who has "930" in his url for this <a href="http://www.auchandrive.fr/" rel="nofollow noreferrer">site</a> </p>

<pre><code>&lt;div id="liste_drives"&gt;
    &lt;ul&gt;
    &lt;li class=""&gt;
        &lt;span class="left"&gt;
        02 -
        &lt;a href="http://www.tt.com/d/n/p/st-985"&gt;tt&lt;/a&gt;
        &lt;p class="a"&gt; &lt;/p&gt;
        &lt;/span&gt;
        &lt;a class="entre"  href="/d/m/St-985/"&gt;i enter here&lt;/a&gt;  
    &lt;/li&gt;
    &lt;li class=""&gt;
        &lt;span class="left"&gt;
        03 -
        &lt;a href="http://www.tt.com/d/n/p/ee-930"&gt;tt&lt;/a&gt;
        &lt;p class="a"&gt; &lt;/p&gt;
        &lt;/span&gt;
        &lt;a class="entre"  href="/d/m/ee-930/"&gt;i enter here&lt;/a&gt;
    &lt;/li&gt;
&lt;/div&gt;
</code></pre>

<p>i read <a href="https://stackoverflow.com/questions/19058637/how-to-click-a-link-whose-href-has-a-certain-substring-in-selenium">this answer</a> </p>

<p>and i try this :</p>

<pre><code>id = "930"
driver.find_element_by_css_selector('"a[href*=%s]" %id').click()
</code></pre>

<p>but i can't click on url</p>