フィルターのクリア

How to play a Youtube video in MatLab programming and then close the browser?

6 ビュー (過去 30 日間)
Bruno Desart
Bruno Desart 2020 年 12 月 14 日
コメント済み: Abhishek Gupta 2021 年 1 月 11 日
Can you please tell me how to play a Youtube video Matlab programming and then close the browser as soon as the video has been completly played?
Many thanks in advance.

回答 (1 件)

Abhishek Gupta
Abhishek Gupta 2020 年 12 月 17 日
Hi,
As per my understanding, you want to open and close a youtube video using MATLAB. This task can be divided into the following steps: -
  1. Open a web page in a browser.
  2. Get the duration of the video by parsing the HTML code. (Hint: find the element that stores the duration of the video in the html tree using findElement).
  3. Schedule the execution of the command to close the browser window using Timer.
Also, referring to the following MATLAB Answers, which might help you in achieving the goal: -
  1. Close a web browser from a script
  2. Execute a command after a delay
  2 件のコメント
Bruno Desart
Bruno Desart 2021 年 1 月 11 日
Thanks very much Abhishek. Quite useful indeed.
Krgds,
Bruno
Abhishek Gupta
Abhishek Gupta 2021 年 1 月 11 日
Accept the answer if you find it useful!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by