How to fetch watch history of youtube using unofficial youtube api?

With the datakund library we can fetch watch history on youtube. For fetching history first you need to login to youtube. Here are the steps to get watch history:-

  1. Install datakund

2. Import datakund

3. Login to youtube through cookies. You can see this article to fetch cookies.

4. Get watch history now by calling get_watch_history function.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store