mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2025-02-02 05:52:31 +01:00
Make Downloader::HTTP_Login print some more info
This commit is contained in:
parent
b23c9ed27d
commit
cba5fb928a
@ -1728,6 +1728,7 @@ int Downloader::HTTP_Login(const std::string& email, const std::string& password
|
||||
tree<htmlcxx::HTML::Node>::iterator it = dom.begin();
|
||||
tree<htmlcxx::HTML::Node>::iterator end = dom.end();
|
||||
// Find auth_url
|
||||
bool bFoundAuthUrl = false;
|
||||
for (; it != end; ++it)
|
||||
{
|
||||
if (it->tagName()=="script")
|
||||
@ -1751,7 +1752,12 @@ int Downloader::HTTP_Login(const std::string& email, const std::string& password
|
||||
|
||||
if (!auth_url.empty())
|
||||
{ // Found auth_url, get the necessary info for login
|
||||
bFoundAuthUrl = true;
|
||||
std::string login_form_html = this->getResponse(auth_url);
|
||||
#ifdef DEBUG
|
||||
std::cerr << "DEBUG INFO (Downloader::HTTP_Login)" << std::endl;
|
||||
std::cerr << login_form_html << std::endl;
|
||||
#endif
|
||||
tree<htmlcxx::HTML::Node> login_dom = parser.parseTree(login_form_html);
|
||||
tree<htmlcxx::HTML::Node>::iterator login_it = login_dom.begin();
|
||||
tree<htmlcxx::HTML::Node>::iterator login_it_end = login_dom.end();
|
||||
@ -1790,6 +1796,11 @@ int Downloader::HTTP_Login(const std::string& email, const std::string& password
|
||||
}
|
||||
}
|
||||
|
||||
if (!bFoundAuthUrl)
|
||||
{
|
||||
std::cout << "Failed to find url for login form" << std::endl;
|
||||
}
|
||||
|
||||
if (token.empty())
|
||||
{
|
||||
std::cout << "Failed to get login token" << std::endl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user