blob: 347662bd7e7fd98abdd0e58c04b101c4b6cfc3d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#ifndef EXTRACTOR_H_
#define EXTRACTOR_H_
#include <cjson/cJSON.h>
#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
enum site { SITE_BILIBILI, SITE_HAOKAN };
typedef enum site site_t;
typedef struct site_map {
struct {
char domain[SHRT_MAX];
site_t site;
} pairs[2];
unsigned char size;
} Site_map;
typedef struct options {
site_t site;
char *URL;
char *path;
char *query;
char *pagedata;
} Options;
void options_cleanup(Options*);
int extract(void *);
#endif
|