@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.
@donaldcassey yes it should work with soundcloud. I didn’t test it, but the module contains a file for extracting data from soundcloud. If you want to use this, just copy the code into a new directory and create a file called ‘songs.txt’ . Then paste every link into a new line in the text file. The code does not work if the file contains empty lines, but you can fix that with by replacing
@Drizzel, I was thinking about getting 100% accurate detection by first doing the rectangle intersection, and if that indicates a possible hit, then placing shape 1 on a canvas in memory, then ”deleting” the non-transparent pixels of shape 2 (also properly placed). If the end result does not equal the original, you have a hit.