Vlad
After some experimenting, I have working (non perfect) python code that checks whether there are sponsored segments/advertisements in any video in a given feed URL.
Details:
- It can take a list of feeds, such as the
small_yt.txt
and gets the feed xml. - For each feed it retrieves the video URLs and checks them against the SponsorBlock API.
- If there is sponsored content/ads it will add up the total duration of it and write the feed URL into a file together with the total duration of all sponsored content. The threshold for this is currently 0.
Note that the SponsorBlock API is licensed under CC-BY-NC-SA 4.0, see here. This means two things:
- It cannot be used for commercial purposes. IANAL, but I think this is fine. See https://creativecommons.org/faq/#does-my-use-violate-the-noncommercial-clause-of-the-licenses.
- It is SA ("Share alike"), which means the rest of the source code has to be CC-BY-SA-NC 4.0 licensed as well, but:
The author explicitly says "If you need to use the database or API in a way that violates this license, contact me with your reason and I may grant you access under a different license."(link)
So if you do not want to relicense your code, you could ask them for permission (chances are good I think).
@Vlad, if you are still interested, I can share my code with you.