OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to get speedtest results from OpenSpeedTest using APIs?

  • Thread starter Thread starter vibhav shukla
  • Start date Start date
V

vibhav shukla

Guest
I am trying to get results from a self hosted OpenSpeedTest server, but I am not able to find any APIs for the same. I can see many API calls like : http://10.86.37.20:3000/download?n=0.015355377695134287, http://10.86.37.20:3000/download?n=0.6503051365529298 but they are not returning any response, just starts a download of a 50 Mb file. Is there any way I can leverage these APIs to calculate the speed?

Currently I am using selenium to scrape the results when the speed test is over.

Code:
    download = driver.find_element(By.ID, 'downResult').text
    upload = driver.find_element(By.ID, 'upRestxt').text
    ping = driver.find_element(By.ID, 'pingResult').text
    jitter = driver.find_element(By.ID, 'jitterDesk').text

Is there any way I can use the APIs or scrape the results using beautiful soup since selenium can't be used in the project I am assigned?
<p>I am trying to get results from a self hosted OpenSpeedTest server, but I am not able to find any APIs for the same.
I can see many API calls like : <a href="http://10.86.37.20:3000/download?n=0.015355377695134287" rel="nofollow noreferrer">http://10.86.37.20:3000/download?n=0.015355377695134287</a>, <a href="http://10.86.37.20:3000/download?n=0.6503051365529298" rel="nofollow noreferrer">http://10.86.37.20:3000/download?n=0.6503051365529298</a> but they are not returning any response, just starts a download of a 50 Mb file. Is there any way I can leverage these APIs to calculate the speed?</p>
<p>Currently I am using selenium to scrape the results when the speed test is over.</p>
<pre><code> download = driver.find_element(By.ID, 'downResult').text
upload = driver.find_element(By.ID, 'upRestxt').text
ping = driver.find_element(By.ID, 'pingResult').text
jitter = driver.find_element(By.ID, 'jitterDesk').text
</code></pre>
<p>Is there any way I can use the APIs or scrape the results using beautiful soup since selenium can't be used in the project I am assigned?</p>
 

Latest posts

Top