improving player parser

This commit is contained in:
Syping 2018-06-29 02:50:00 +02:00
parent c3d684436b
commit 25c64b7f5d
3 changed files with 10 additions and 7 deletions

View file

@ -198,7 +198,7 @@ QUrl AppEnv::getCrewFetchingUrl(QString crewID)
QUrl AppEnv::getPlayerFetchingUrl(QString crewID, QString pageNumber) QUrl AppEnv::getPlayerFetchingUrl(QString crewID, QString pageNumber)
{ {
return QUrl(QString("https://socialclub.rockstargames.com/crewsapi/GetMembersList?crewId=%1&pageNumber=%2").arg(crewID, pageNumber)); return QUrl(QString("https://socialclub.rockstargames.com/crewsapi/GetMembersList?crewId=%1&pageNumber=%2&pageSize=5000").arg(crewID, pageNumber));
} }
QUrl AppEnv::getPlayerFetchingUrl(QString crewID, int pageNumber) QUrl AppEnv::getPlayerFetchingUrl(QString crewID, int pageNumber)

View file

@ -137,8 +137,9 @@ void DatabaseThread::scanCrewReference(const QStringList &crewList, const int &r
netRequest.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); netRequest.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
#endif #endif
netRequest.setRawHeader("User-Agent", AppEnv::getUserAgent()); netRequest.setRawHeader("User-Agent", AppEnv::getUserAgent());
netRequest.setRawHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); netRequest.setRawHeader("Accept", "text/html");
netRequest.setRawHeader("Accept-Language", "en-US;q=0.5,en;q=0.3"); netRequest.setRawHeader("Accept-Charset", "utf-8");
netRequest.setRawHeader("Accept-Language", "en-US,en;q=0.9");
netRequest.setRawHeader("Connection", "keep-alive"); netRequest.setRawHeader("Connection", "keep-alive");
QNetworkReply *netReply = netManager->get(netRequest); QNetworkReply *netReply = netManager->get(netRequest);
@ -209,8 +210,9 @@ void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int
netRequest.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); netRequest.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
#endif #endif
netRequest.setRawHeader("User-Agent", AppEnv::getUserAgent()); netRequest.setRawHeader("User-Agent", AppEnv::getUserAgent());
netRequest.setRawHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); netRequest.setRawHeader("Accept", "application/json");
netRequest.setRawHeader("Accept-Language", "en-US;q=0.5,en;q=0.3"); netRequest.setRawHeader("Accept-Charset", "utf-8");
netRequest.setRawHeader("Accept-Language", "en-US,en;q=0.9");
netRequest.setRawHeader("Connection", "keep-alive"); netRequest.setRawHeader("Connection", "keep-alive");
QNetworkReply *netReply = netManager->get(netRequest); QNetworkReply *netReply = netManager->get(netRequest);

View file

@ -1464,8 +1464,9 @@ bool ProfileInterface::eventFilter(QObject *watched, QEvent *event)
QNetworkAccessManager *netManager = new QNetworkAccessManager(); QNetworkAccessManager *netManager = new QNetworkAccessManager();
QNetworkRequest netRequest(clipboardUrl); QNetworkRequest netRequest(clipboardUrl);
netRequest.setRawHeader("User-Agent", AppEnv::getUserAgent()); netRequest.setRawHeader("User-Agent", AppEnv::getUserAgent());
netRequest.setRawHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); netRequest.setRawHeader("Accept", "text/html");
netRequest.setRawHeader("Accept-Language", "en-US;q=0.5,en;q=0.3"); netRequest.setRawHeader("Accept-Charset", "utf-8");
netRequest.setRawHeader("Accept-Language", "en-US,en;q=0.9");
netRequest.setRawHeader("Connection", "keep-alive"); netRequest.setRawHeader("Connection", "keep-alive");
QNetworkReply *netReply = netManager->get(netRequest); QNetworkReply *netReply = netManager->get(netRequest);
QEventLoop *downloadLoop = new QEventLoop(); QEventLoop *downloadLoop = new QEventLoop();