#ifndef YTDLPWRAPPER_H #define YTDLPWRAPPER_H #include #include #include namespace Video { struct format { std::optional quality; std::string url; std::string vcodec; std::string acodec; }; struct thumbnail { std::string url; int preference; int id; std::optional resolution; }; struct video { std::string id; std::string title; std::string url; std::string channel; std::optional duration; std::optional viewcount; std::optional description; std::vector formats; std::vector thumbnails; }; } class YtdlpWrapper { public: nlohmann::json getJsonSearch(const std::string& searchTerm, int limit = 1); private: pybind11::object get_ytdl(); pybind11::object ytdl = pybind11::none(); pybind11::scoped_interpreter guard{}; }; #endif