diff --git a/src/episode.cpp b/src/episode.cpp index 8a50378..6271d1f 100644 --- a/src/episode.cpp +++ b/src/episode.cpp @@ -113,7 +113,7 @@ namespace dropout_dl { } } } - return "-1"; + return "ERROR"; } std::string episode::get_episode_name(const std::string& html_data) { @@ -157,24 +157,6 @@ namespace dropout_dl { return "-1"; } - std::string episode::get_season_number(const std::string& html_data) { - std::string season("Season"); - std::string dash(","); - std::string season_num; - for (int i = 0; i < html_data.size(); i++) { - if (substr_is(html_data, i, season)) { - for (int j = i + 7; j < html_data.size(); j++) { - if (html_data[j] == '\n' || html_data[j] == ' ' || html_data[j] == '\t') continue; - if (html_data[j] == '-' || html_data[j] == ',' ) { - return season_num; - } - season_num += html_data[j]; - } - } - } - return "-1"; - } - std::string episode::get_embed_url(const std::string& html_data) { std::string config("window.VHX.config"); std::string embed_url("embed_url: "); diff --git a/src/episode.h b/src/episode.h index 8b9d805..e034157 100644 --- a/src/episode.h +++ b/src/episode.h @@ -222,8 +222,6 @@ namespace dropout_dl { std::string name; /// The number of the episode in the season. This can be a number or a string std::string episode_number; - /// The number of the season. This can be a number or a string - std::string season_number; /// The url for the main episode page std::string episode_url; /// The data of the main episode page @@ -285,15 +283,6 @@ namespace dropout_dl { */ static std::string get_episode_number(const std::string& html_data); - /** - * - * @param html_data - Episode page data - * @return The season number - * - * Get the season number from the episode page - */ - static std::string get_season_number(const std::string& html_data); - /** * * @param html_data - Episode page data @@ -378,12 +367,6 @@ namespace dropout_dl { exit(6); } - this->season_number = get_season_number(episode_data); - - if (verbose) { - std::cout << "Got season: " << this->season_number << '\n'; - } - this->episode_number = get_episode_number(episode_data); if (verbose) {