call main after update

This commit is contained in:
Chenghao Mou 2024-08-07 11:31:58 +01:00
parent cebf809391
commit 944bee0f56
4 changed files with 50 additions and 5406 deletions

View file

@ -1,7 +1,7 @@
name: Daily Update from Dark Visitors name: Daily Update from Dark Visitors
on: on:
schedule: schedule:
- cron: "0 0 * * *" - cron: "*/10 * * * *"
jobs: jobs:
dark-visitors: dark-visitors:
@ -18,4 +18,7 @@ jobs:
python code/dark_visitors.py python code/dark_visitors.py
git add -A git add -A
git diff --quiet && git diff --staged --quiet || (git commit -m "Daily update from Dark Visitors" && git push) git diff --quiet && git diff --staged --quiet || (git commit -m "Daily update from Dark Visitors" && git push)
shell: bash shell: bash
call-main:
uses: ./.github/workflows/main.yml
secrets: inherit

View file

@ -1,4 +1,5 @@
on: on:
workflow_call:
push: push:
paths: paths:
- 'robots.json' - 'robots.json'

View file

@ -26,6 +26,8 @@ to_include = [
for section in soup.find_all("div", {"class": "agent-links-section"}): for section in soup.find_all("div", {"class": "agent-links-section"}):
category = section.find("h2").get_text() category = section.find("h2").get_text()
if category not in to_include:
continue
for agent in section.find_all("a", href=True): for agent in section.find_all("a", href=True):
name = agent.find("div", {"class": "agent-name"}).get_text().strip() name = agent.find("div", {"class": "agent-name"}).get_text().strip()
desc = agent.find("p").get_text().strip() desc = agent.find("p").get_text().strip()

File diff suppressed because it is too large Load diff