-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cpp
More file actions
24 lines (18 loc) · 696 Bytes
/
Copy pathtest.cpp
File metadata and controls
24 lines (18 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "NichanParser/NichanParser.h"
#include <iostream>
#include <ctime>
//ctimeを使うとコンパイルできないのを抑制
#pragma warning(disable:4996)
#define _CRT_SECURE_NO_WARNINGS
int main() {
auto thread=Nichan::ParseThreadFromUrl("http://karma.2ch.net/test/read.cgi/livemx/1466236234/l50");
std::cout << thread.title << std::endl;
for (const auto &res : thread.res)
{
std::time_t t = std::chrono::system_clock::to_time_t(res.date);
std::cout << std::ctime(&t) << " : "<< res.message << std::endl;
}
auto board = Nichan::ParseBoardFromUrl("http://hayabusa7.2ch.net/livecx/subback.html");
std::cout << board.title << std::endl;
std::cout << board.thread[0].title << std::endl;
}