feedifiy.ini: clean up following feeds.py's html intro

master
pictuga 2020-03-18 16:52:28 +01:00
parent ab145813d6
commit 296e9a6c13
1 changed files with 29 additions and 12 deletions

View File

@ -87,46 +87,63 @@ item_content = content
item_time = time item_time = time
item_updated = updated item_updated = updated
[html]
mode = html
title = //div[@id='header']/h1
desc = //div[@id='header']/h2
items = //div[@id='content']/div
item_title = ./a
item_link = ./a/@href
item_desc = ./div[class=desc]
item_content = ./div[class=content]
base = <!DOCTYPE html> <html> <head> <title>Feed reader by morss</title> <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" /> </head> <body> <div id="header"> <h1>@feed.title</h1> <h2>@feed.desc</h2> <p>- via morss</p> </div> <div id="content"> <div class="item"> <a class="title link" href="@item.link" target="_blank">@item.title</a> <div class="desc">@item.desc</div> <div class="content">@item.content</div> </div> </div> <script> var items = document.getElementsByClassName('item') for (var i in items) items[i].onclick = function() { this.classList.toggle('active') document.body.classList.toggle('noscroll') } </script> </body> </html>
[twitter] [twitter]
mode = xpath mode = html
path = path =
http://twitter.com/* http://twitter.com/*
https://twitter.com/* https://twitter.com/*
http://www.twitter.com/* http://www.twitter.com/*
https://www.twitter.com/* https://www.twitter.com/*
title = //head/title/text() title = //head/title
items = //table[class=tweet]|//div[class=tweet] items = //table[class=tweet]|//div[class=tweet]
item_title = .//strong[class=fullname]/text() " (" normalize-space(string(.//div[class=username])) ")" item_title = .//div[class=username]
item_link = ./@href item_link = ./@href
item_content = .//div[class=tweet-text]/div item_desc = .//div[class=tweet-text]/div
[google] [google]
mode = xpath mode = html
path = path =
http://google.com/search?q=* http://google.com/search?q=*
http://www.google.com/search?q=* http://www.google.com/search?q=*
title = //head/title/text() title = //head/title
items = //li[class=g] items = //li[class=g]
item_title = .//h3//text() item_title = .//h3
item_link = .//a/@href item_link = .//a/@href
item_content = .//span[class=st] item_desc = .//span[class=st]
[ddg.gg] [ddg.gg]
mode = xpath mode = html
path = path =
http://duckduckgo.com/html/?q=* http://duckduckgo.com/html/?q=*
https://duckduckgo.com/html/?q=* https://duckduckgo.com/html/?q=*
title = //head/title/text() title = //head/title
items = //div[class=results_links][not(contains(@class,'sponsored'))] items = //div[class=results_links][not(contains(@class,'sponsored'))]
item_title = .//a[class=result__a]//text() item_title = .//a[class=result__a]
item_link = .//a[class=result__a]/@href item_link = .//a[class=result__a]/@href
item_content = string(.//a[class=result__snippet]) item_desc = .//a[class=result__snippet]
[facebook home] [facebook home]
mode = json mode = json