name: Fetch Web pages
on:
issues:
types:
- opened
jobs:
Fetch-and-Save:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- uses: browser-actions/setup-chrome@v1
- name: Setup Web-fetch
run: pnpm i web-fetch -g
- name: Fetch first URL in Issue Body
run: web-fetch $(echo "${{ github.event.issue.Body }}" | grep -Eo "https?://\S+")
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '${{ github.event.issue.title }}'
|
export const body_tag = [ |
|
'article', |
|
'main', |
|
'.article', |
|
'.content', |
|
'.post', |
|
'.blog', |
|
'.main', |
|
'.container', |
|
'body' |
|
]; |
|
|
|
export const meta_tag = { |
|
title: ['h1', 'h2', '.title', 'title'].map(likeOf), |
|
authors: ['.author', '.publisher', '.creator', '.editor'].map(likeOf), |
|
date: ['.date', '.time', '.publish', '.create'].map(likeOf), |
|
updated: ['.update', '.edit', '.modif'].map(likeOf), |
|
categories: ['.breadcrumb', '.categor'].map(likeOf), |
|
tags: ['.tag', '.label'].map(likeOf) |
|
}; |