std::string ClientActions::ParseUrl(std::string url) { std::string buffer = url; //veoh://downloadVideo/?permalinkId=v1069368wnHFt2sE&command=49347A0A-C783-4e92-ADCE-ED7C93207E58 if(buffer.find("veoh://") != std::string::npos && buffer.find("49347A0A-C783-4e92-ADCE-ED7C93207E58") != std::string::npos) { buffer.erase(0, buffer.find_first_of("=")+1); if(buffer.find("&") != std::string::npos) { buffer.erase(buffer.find("&")); } } else { if(buffer.find("?") != std::string::npos) { buffer.erase(buffer.find_last_of("?")); } if(buffer.find("/") != std::string::npos) { buffer.erase(0, buffer.find_last_of("/")+1); } } return buffer; }