S_New4/pageManager.h

43 lines
1.4 KiB
C
Raw Normal View History

2019-07-06 18:47:29 +00:00
#ifndef MANAGEPAGE_H
#define MANAGEPAGE_H
#include <iostream>
#include <curl/curl.h>
#include <string.h>
#include <sstream>
#include "accountManager.h"
struct Reply {
Reply() {}
Reply(std::string value_both) : html(value_both), url(value_both) {}
Reply(std::string html, std::string url) : html(html), url(url) {}
std::string html, url;
};
class PageManager
{
public:
PageManager(std::string sock5Proxy = "socks5://127.0.0.1:9150", std::string cookieFilePath = "/tmp/S_New4_cookies");
~PageManager();
Reply getServerRequest(std::string Url, bool useCookies = false, std::string data = "", bool generateCookieFile = false);
int login(Account account);
std::string getUrlAfterRedirect(std::string Url);
std::string checkName(std::string Name);
std::string getLinks(std::string HTML);
std::string chooseHosterLink(std::string HosterList, std::string Hoster_with_Highst_Priority_at_First, std::string languages_with_highst_priority_at_first);
std::string replace(std::string str, std::string substr1, std::string substr2);
int counterContains(std::string text, std::string substring_with_prozent_i_for_number, int starte_mit_dieser_Zahl = 1);
std::string grep(std::string text, std::string substring);
const std::string UrlPraefix = "https://s.to/serie/stream/";
private:
std::string sock5Proxy, cookieFilePath;
};
#endif // MANAGEPAGE_H