@Drizzel@omz's code is identical, excep that he specifies the argtypes on the playaudiosystemsound, which you should also do, otherwise you risk crashing (say on a 32 bit vs 64 bit device).
I think ctypes defaults to 32 bit argtypes even on 64 bit devices, so you are safe in this case.
@Drizzel The script is from Shaun-h, not mine. I only added some lines for your alert in the delete case.
And the code is not sufficient so, you still have to add some lines for the real delete, when confirmed. Good work and good luck
@Drizzel, some sites are use so much JS that they are hard to scrape with just requests and bs4. If this is the case here, you can use WebView to act as a browser and run the JS. I have a small helper class for this, discussed here.
In all cases, web scraping seems to be a lot of detective work, trial and error.
One thing that can happen sometimes it's if you hit X right after running a script. Since numpy or matplotlib are very large, importing them takes some time. If you cancel before the import is complete, you get a partial import, which breaks later imports.
If you are a common user want to download YouTube music to MP3 but not familiar with these codes, don't worry. This tutorial will provide another way to extract audio from YouTube videos. In addition, it's very easy to operate for new users.