-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdict_str_class.py
32 lines (27 loc) · 1.26 KB
/
dict_str_class.py
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
from loader.playwright_loaders import PlaywrightBodyPageLoader, PlaywrightIndexPageLoader
from loader.aiohttp_loaders import AiohttpBodyPageLoader, AiohttpIndexPageLoader
import playwright_websession
import aiohttp_websession
from parse_rule.aiohttp_low_rules import LxmlCssElementRule, BodyPageContentLxmlCssElementRule, LxmlXpathElementRule, BodyPageContentLxmlXpathElementRule
from parse_rule.playwright_low_rules import PlaywrightElementRule, BodyPageContentPlaywrightElementRule, PlaywrightClickRule
body_page_loaders = {
'playwright': PlaywrightBodyPageLoader,
'aiohttp': AiohttpBodyPageLoader
}
index_page_loaders = {
'playwright': PlaywrightIndexPageLoader,
'aiohttp': AiohttpIndexPageLoader
}
web_sessions = {
'playwright': playwright_websession.WebSession,
'aiohttp': aiohttp_websession.WebSession
}
low_rules = {
'LxmlCssElementRule': LxmlCssElementRule,
'BodyPageContentLxmlCssElementRule': BodyPageContentLxmlCssElementRule,
'LxmlXpathElementRule': LxmlXpathElementRule,
'BodyPageContentLxmlXpathElementRule': BodyPageContentLxmlXpathElementRule,
'PlaywrightElementRule': PlaywrightElementRule,
'BodyPageContentPlaywrightElementRule': BodyPageContentPlaywrightElementRule,
'PlaywrightClickRule': PlaywrightClickRule
}