-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
35 lines (28 loc) · 785 Bytes
/
Copy pathexample.py
File metadata and controls
35 lines (28 loc) · 785 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
25
26
27
28
29
30
31
32
33
34
35
from htmltoapi import serverbuilder
config = {
"resources": [
{
"name": "Article",
"source_url": "http://www.burlingtonfreepress.com/news/local/",
"elements": [
{
"name": "link",
"element": {
"type": "a",
"class": "hgpm-link",
"attribute": "href"
}
},
{
"name": "title",
"element": {
"type": "p",
"class": "hgpm-image-hed"
}
}
]
}
]
}
"""Create the API Server"""
serverbuilder.Builder(config).create()