Fix pagination issue

This commit is contained in:
stom79 2019-02-18 14:00:00 +01:00
parent b67326d527
commit 545b6ccb7c
1 changed files with 4 additions and 4 deletions

View File

@ -1706,13 +1706,13 @@ public class HttpsConnection {
Map<String, List<String>> map = httpsURLConnection.getHeaderFields();
for (Map.Entry<String, List<String>> entry : map.entrySet()) {
if (entry.toString().startsWith("Link") || entry.toString().startsWith("link") ) {
Pattern patternMaxId = Pattern.compile("max_id=([0-9]{1,}).*");
Pattern patternMaxId = Pattern.compile("max_id=([0-9a-zA-Z]{1,}).*");
Matcher matcherMaxId = patternMaxId.matcher(entry.toString());
if (matcherMaxId.find()) {
max_id = matcherMaxId.group(1);
}
if (entry.toString().startsWith("Link")) {
Pattern patternSinceId = Pattern.compile("since_id=([0-9]{1,}).*");
Pattern patternSinceId = Pattern.compile("since_id=([0-9a-zA-Z]{1,}).*");
Matcher matcherSinceId = patternSinceId.matcher(entry.toString());
if (matcherSinceId.find()) {
since_id = matcherSinceId.group(1);
@ -1727,13 +1727,13 @@ public class HttpsConnection {
Map<String, List<String>> map = httpURLConnection.getHeaderFields();
for (Map.Entry<String, List<String>> entry : map.entrySet()) {
if (entry.toString().startsWith("Link") || entry.toString().startsWith("link")) {
Pattern patternMaxId = Pattern.compile("max_id=([0-9]{1,}).*");
Pattern patternMaxId = Pattern.compile("max_id=([0-9a-zA-Z]{1,}).*");
Matcher matcherMaxId = patternMaxId.matcher(entry.toString());
if (matcherMaxId.find()) {
max_id = matcherMaxId.group(1);
}
if (entry.toString().startsWith("Link")) {
Pattern patternSinceId = Pattern.compile("since_id=([0-9]{1,}).*");
Pattern patternSinceId = Pattern.compile("since_id=([0-9a-zA-Z]{1,}).*");
Matcher matcherSinceId = patternSinceId.matcher(entry.toString());
if (matcherSinceId.find()) {
since_id = matcherSinceId.group(1);