mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 21:56:42 +00:00
make_nvidia_udev.py: spoof user agent to avoid 403
This commit is contained in:
parent
8f1665c742
commit
da0e0cc452
@ -40,7 +40,12 @@ for version in sys.argv[1:]:
|
||||
|
||||
for version in versions:
|
||||
url = 'http://us.download.nvidia.com/XFree86/Linux-x86_64/' + version + '/README/supportedchips.html'
|
||||
page = requests.get(url)
|
||||
|
||||
headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1',
|
||||
}
|
||||
|
||||
page = requests.get(url, headers=headers)
|
||||
tree = html.fromstring(page.content)
|
||||
|
||||
# These are the tables we want to use (gpu's supported by the current driver)
|
||||
|
@ -20,7 +20,12 @@ for line in open(__package__, 'r'):
|
||||
break
|
||||
|
||||
url = 'http://us.download.nvidia.com/XFree86/Linux-x86_64/' + __version__ + '/README/supportedchips.html'
|
||||
page = requests.get(url)
|
||||
|
||||
headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1',
|
||||
}
|
||||
|
||||
page = requests.get(url, headers=headers)
|
||||
tree = html.fromstring(page.content)
|
||||
|
||||
# These are the tables we want to use (gpu's supported by the current driver)
|
||||
|
Loading…
x
Reference in New Issue
Block a user