forked from ZhuPeng/trackupdates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgithubtrending.yaml
46 lines (42 loc) · 1.28 KB
/
githubtrending.yaml
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
36
37
38
39
40
41
42
43
44
45
46
global:
# The smarthost and SMTP sender used for mail notifications.
smtp_smarthost: 'example.smtp.com:587'
smtp_from: '[email protected]'
smtp_auth_username: '[email protected]'
smtp_auth_password: 'example'
store: 'github.db'
jobs:
- name: 'githubtrending'
# run every 5 minute
cron: '*|*/5'
url:
test_target: 'examples/githubtrending'
target: 'https://github.com/trending/{lang}?since=daily'
query_parameter:
lang:
- type: string
value: all
- type: distinct
value: lang
parser: 'githubtrending'
parsers:
- name: 'githubtrending'
base_url: 'https://github.com'
base_xpath:
- "//li[@class='col-12 d-block width-full py-4 border-bottom']"
attr:
url: 'div/h3/a/@href'
repo: 'div/h3/a'
desc: "div[@class='py-1']/p"
lang: "div/span/span[@itemprop='programmingLanguage']"
star: "div/a[@aria-label='Stargazers']"
fork: "div/a[@aria-label='Forks']"
today: "div/span[@class='float-right']"
format:
markdown: '[{lang}: {repo}]({url}), star: {star}, fork: {fork}, today-star: {today} <br> {desc}'
html: '<p><a href="{url}">{lang}: {repo}</a> start: {star}, fork: {fork}, today-star: {today}, {desc}</p>'
receivers:
- name: 'example'
email_configs:
to: