-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcnp.h
27 lines (23 loc) · 1.04 KB
/
cnp.h
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
#ifndef cnp_h
#define cnp_h
#include <iostream>
#include <string>
#include <vector>
namespace cnp {
std::string download_page(const std::string &url);
std::string html_to_text(const std::string &html);
std::string get_webpage_text(const std::string &url);
std::vector<std::string> get_tags_to_array(const std::string &html,
const std::string &tag_name);
std::vector<std::string> find_elements_by_class(const std::string &html,
const std::string &class_name);
std::string find_element_by_id(const std::string &html, const std::string &id);
std::vector<std::string> find_elements_by_attr_val(const std::string &html,
const std::string &attr_name,
const std::string &attr_val);
std::string get_element_text(const std::string &html, const std::string &tag);
std::vector<std::string> extractUrls(const std::string& text);
bool init();
void cleanup();
} // namespace cnp
#endif