mirror of
https://github.com/keylase/nvidia-patch.git
synced 2024-11-22 21:47:19 +00:00
ndl: workaround broken layout on Vulkan Beta downloads page
This commit is contained in:
parent
c96e9df713
commit
6a0431bd97
@ -55,10 +55,10 @@ def get_drivers(*, timeout=10):
|
|||||||
body = fetch_url(URL)
|
body = fetch_url(URL)
|
||||||
soup = BeautifulSoup(body, 'html.parser')
|
soup = BeautifulSoup(body, 'html.parser')
|
||||||
result = []
|
result = []
|
||||||
for sibling in soup.find('h4',
|
section_start = soup.find('h4', string=re.compile(r'Vulkan Beta Driver Downloads', re.I))
|
||||||
string=re.compile(r'Vulkan .* Developer Beta Driver Downloads', re.I)
|
section_end = section_start.find_next("h4")
|
||||||
).next_siblings:
|
for sibling in section_start.find_all_next():
|
||||||
if sibling.name == 'h4':
|
if sibling is section_end:
|
||||||
break
|
break
|
||||||
if sibling.name == 'p' and sibling.b is not None:
|
if sibling.name == 'p' and sibling.b is not None:
|
||||||
m = re.match(r'(Windows|Linux)\s+((\d+\.){1,2}\d+)', sibling.b.string)
|
m = re.match(r'(Windows|Linux)\s+((\d+\.){1,2}\d+)', sibling.b.string)
|
||||||
|
Loading…
Reference in New Issue
Block a user