title: Speedtest-cli on a different interface
body: <p>I have eth0, eth1 and wlan0 connected to my Raspberry Pi. I would like to measure the internet speed of the different interface, in this case - eth1. It works well for eth0 (192.168.1.21), but I get an error if I try to use a different interface, in this case, eth1 (192.168.8.100).</p>
  <p>I have read Speedtest python API documentation and mostly copied code from there. I have also tried to search before posting on StackOverflow.</p>
  <pre><code>source = &quot;192.168.8.100&quot; #eth1
  s = speedtest.Speedtest(source_address=source)
  s.get_servers()
  s.get_best_server()
  s.download()
  s.upload()
  res = s.results.dict()
  download = res[&quot;download&quot;]
  upload = res[&quot;upload&quot;]
  ping = round(res[&quot;ping&quot;])
  print(download, upload, ping)
  </code></pre>
  <p>EDIT: This is the error:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;/usr/local/lib/python3.8/dist-packages/flask/app.py&quot;, line 2464, in __call__
      return self.wsgi_app(environ, start_response)
    File &quot;/usr/local/lib/python3.8/dist-packages/flask/app.py&quot;, line 2450, in wsgi_app
      response = self.handle_exception(e)
    File &quot;/usr/local/lib/python3.8/dist-packages/flask/app.py&quot;, line 1867, in handle_exception
      reraise(exc_type, exc_value, tb)
    File &quot;/usr/local/lib/python3.8/dist-packages/flask/_compat.py&quot;, line 39, in reraise
      raise value
    File &quot;/usr/local/lib/python3.8/dist-packages/flask/app.py&quot;, line 2447, in wsgi_app
      response = self.full_dispatch_request()
    File &quot;/usr/local/lib/python3.8/dist-packages/flask/app.py&quot;, line 1952, in full_dispatch_request
      rv = self.handle_user_exception(e)
    File &quot;/usr/local/lib/python3.8/dist-packages/flask/app.py&quot;, line 1821, in handle_user_exception
      reraise(exc_type, exc_value, tb)
    File &quot;/usr/local/lib/python3.8/dist-packages/flask/_compat.py&quot;, line 39, in reraise
      raise value
    File &quot;/usr/local/lib/python3.8/dist-packages/flask/app.py&quot;, line 1950, in full_dispatch_request
      rv = self.dispatch_request()
    File &quot;/usr/local/lib/python3.8/dist-packages/flask/app.py&quot;, line 1936, in dispatch_request
      return self.view_functions[rule.endpoint](**req.view_args)
    File &quot;/root/post_test2.py&quot;, line 11, in home
      s = speedtest.Speedtest(source_address=source)
    File &quot;/usr/lib/python3/dist-packages/speedtest.py&quot;, line 1091, in __init__
      self.get_config()
    File &quot;/usr/lib/python3/dist-packages/speedtest.py&quot;, line 1123, in get_config
      raise ConfigRetrievalError(e)
  speedtest.ConfigRetrievalError: &lt;urlopen error timed out&gt;
  </code></pre>