Skip to content

Commit

Permalink
-Add new file for driver combined (RNDA + Polaris/Vega)
Browse files Browse the repository at this point in the history
-Change workflow to include new driver
  • Loading branch information
nunodxxd committed Nov 9, 2024
1 parent f09177e commit b0b581d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/scrape.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ jobs:
run: |-
python clean_full.py ${{env.version}} > configs/link_full.txt
echo "link_full=$(cat configs/link_full.txt)" >> $GITHUB_ENV
- name: Clear link_full_combined.txt
run: echo "" > configs/link_full_combined.txt
- name: Fetch link for full setup combined(Polaris/Vega + RDNA)
if: env.link != env.old_link && env.tag != env.latest_tag
run: |-
python clean_full_combined.py ${{env.version}} > configs/link_full_combined.txt
if [ -s configs/link_full_combined.txt ]; then
echo "link_full_combined=$(cat configs/link_full_combined.txt)" >> $GITHUB_ENV
fi
- name: Save new minimal setup
if: env.link != env.old_link && env.tag != env.latest_tag
run: |-
Expand All @@ -57,6 +66,10 @@ jobs:
if: env.link != env.old_link && env.tag != env.latest_tag
run: |-
curl --create-dirs -O --output-dir "driver" '${{ env.link_full }}' -K configs/headers.txt --compressed
- name: Save new full setup combined (Polaris/Vega + RDNA)
if: env.link != env.old_link && env.tag != env.latest_tag && env.link_full_combined
run: |-
curl --create-dirs -O --output-dir "driver" '${{ env.link_full_combined }}' -K configs/headers.txt --compressed
- name: Generate new changelog
if: env.link != env.old_link && env.tag != env.latest_tag
run: |-
Expand Down
12 changes: 12 additions & 0 deletions clean_full_combined.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import sys
import requests
from bs4 import BeautifulSoup

headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36', "Upgrade-Insecure-Requests": "1","DNT": "1","Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","Accept-Language": "en-US,en;q=0.5","Accept-Encoding": "gzip, deflate"}
html = requests.get(f'https://www.amd.com/en/resources/support-articles/release-notes/RN-RAD-WIN-{sys.argv[1]}.html',headers=headers).content

soup = BeautifulSoup(html, 'html.parser')
a = soup.select('a[href*="/drivers/"]')
link = a[1].get('href')

print(link)

0 comments on commit b0b581d

Please sign in to comment.