-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.toml
31 lines (29 loc) · 835 Bytes
/
config.toml
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
[global]
[global.enable_modules]
config=1
[pywallpaper]
wallPaperCachePath="wallPaperCache"
defaultSource='bingHPImageArchive'
[pywallpaper.enable_modules]
libs=1
main=1
schedule=1
[pywallpaper.schedule]
updateTime='0:0'
[pywallpaper.source.bingHPImageArchive]
url='https://www.bing.com/HPImageArchive.aspx?format=js&idx={day}&n=1'
filter="""import json
ret=json.load(ret)['images'][0]
pic_title=ret['copyright']
links='https://www.bing.com'+ret['url']"""
[pywallpaper.source.wallpaper_abyss]
url='https://wall.alphacoders.com/'
filter="""
from lxml.etree import HTML
flt = HTML(ret.read())
img_src = flt.xpath('//img[@class="img-responsive"]/@src')[0]
pic_title='The wallpaper from '+flt.xpath('//div[@class="featured-categorization"]/span/a/text()')[2].strip()
links=img_src
print(links, pic_title)
"""
need_packages=['lxml.etree']