25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 | 25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 |
-
+
| #
# The category list is hardwired in this plugin.
#
from config import *
from uikit import uikit
import ahttp as http
import ahttp
from channels import *
#from xml.sax.saxutils import unescape as entity_decode, escape as xmlentities
#import xml.dom.minidom
import json
import re
|
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114 | 100
101
102
103
104
105
106
107
108
109
110
111
112
113
114 |
-
+
| params = {}
if cat:
params["cat"] = cat.lower()
if search:
params["search"] = search
#-- get data
data = http.get(self.json_url, params=params)
data = ahttp.get(self.json_url, params=params)
#log.DATA(data)
#-- extract
l = []
log.PROC( "processing api.dir.xiph.org JSON (via api.include-once.org cache)" )
data = json.loads(data)
for e in data: |