~hmatuschek/+junk/rbnc-package

« back to all changes in this revision

Viewing changes to src/rbn.cc

  • Committer: Hannes Matuschek
  • Date: 2021-02-17 09:35:21 UTC
  • mfrom: (1.1.6)
  • Revision ID: hmatuschek@gmail.com-20210217093521-2nv0ad10n2rl2pge
Fixed spotter callsign issue.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
        QString data = QString::fromUtf8(reply->readAll()).simplified();
31
31
  data.remove('\r'); data.remove('\n');
32
32
 
33
 
        QRegExp re("<td[^>]*><a href=\"/dxsd1.php\\?f=[^>]*>\\s*([A-Z0-9/]*)\\s*</a>[^<]*</td>\\s*<td[^>]*>\\s*([0-9m,]*)</a></td>\\s*<td[^>]*>([0-9A-Za-z]*)</td>", Qt::CaseInsensitive);
 
33
  QRegExp re("<td[^>]*><a href=\"/dxsd1.php\\?f=[^>]*>\\s*([A-Z0-9/\\-]*)\\s*</a>[^<]*</td>\\s*<td[^>]*>\\s*([0-9m,]*)</a></td>\\s*<td[^>]*>([0-9A-Za-z]*)</td>", Qt::CaseInsensitive);
34
34
        int start = 0;
35
35
        while (0 < (start = data.indexOf("online24h online7d total\">", start))) {
36
36
                start += 27;
41
41
                        continue;
42
42
                QString spotter = re.cap(1);
43
43
                QString grid = re.cap(3);
 
44
    qDebug() << "Add spotter " << re.cap(1) << " @ " << re.cap(3);
44
45
    _spotter[spotter] = grid;
45
46
        }
46
47