title: Web Scrapping options from dropdown with Python
body: <p>I am trying to get a list of all the airports from <a href="https://www.flight-distance.com/" rel="nofollow noreferrer">https://www.flight-distance.com/</a> Select Origin dropdown. I have managed to get the start of the data with the below code. but I can't figure out how to get all the options from the site as shown in the attached image.(Only starting to learn Python)</p>
  <p>So for eg. the list would start with
  Goroka (GKA, AYGA),
  Madang (MAG, AYMD),
  Mount Hagen (HGU, AYMH),
  etc.</p>
  <pre><code>import requests
  from bs4 import BeautifulSoup
  r=requests.get(&quot;http://www.flight-distance.com/&quot;)
  #type(r)
  c=r.content
  soup=BeautifulSoup(c,&quot;html.parser&quot;)
  all=soup.find_all(&quot;select&quot;,{&quot;id&quot;:&quot;source_airport&quot;})
  all
  </code></pre>
  <p>Result:</p>
  <pre><code>&gt; [&lt;select class=&quot;form-control single_sel_air&quot; id=&quot;source_airport&quot;
  &gt; name=&quot;source_airport&quot;&gt;  &lt;option value=&quot;&quot;&gt;Please select airport or
  &gt; city&lt;/option&gt;  &lt;/select&gt;]
  </code></pre>
  <p><a href="https://i.stack.imgur.com/jNQ1A.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jNQ1A.png" alt="Airports" /></a></p>
  <p>Really appreciate any and all help</p>