Browse Source

[enh] urbandictionary xpath engine added

asciimoo 11 years ago
parent
commit
43f5fcea80
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      engines.cfg_sample

+ 8
- 0
engines.cfg_sample View File

5
 
5
 
6
 [bing]
6
 [bing]
7
 engine = bing
7
 engine = bing
8
+language = en-us
8
 
9
 
9
 [deviantart]
10
 [deviantart]
10
 engine = deviantart
11
 engine = deviantart
47
 engine = twitter
48
 engine = twitter
48
 categories = social media
49
 categories = social media
49
 
50
 
51
+[urbandictionary]
52
+engine        = xpath
53
+search_url    = http://www.urbandictionary.com/define.php?term={query}
54
+url_xpath     = //div[@id="entries"]//div[@class="word"]//a
55
+title_xpath   = //div[@id="entries"]//div[@class="word"]//span//text()
56
+content_xpath = //div[@id="entries"]//div[@class="text"]//div[@class="definition"]//text()
57
+
50
 [yahoo]
58
 [yahoo]
51
 engine        = xpath
59
 engine        = xpath
52
 search_url    = http://search.yahoo.com/search?p={query}
60
 search_url    = http://search.yahoo.com/search?p={query}