A simple update after a year

why did i use two foreach loops?
This commit is contained in:
YourSandwich 2022-05-22 12:50:47 +02:00 committed by GitHub
parent 4d0566b487
commit d70ac88d1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,12 +14,11 @@ del project_href[0]
KernelURL = [] KernelURL = []
KernelVerList = [] KernelVerList = []
for m in project_href[::2]:
KernelURL.append("https://archive.archlinux.org/packages/l/linux/"+m)
## Making complicated stuff to extract only the Kernel Version from the WebScrap ## Making complicated stuff to extract only the Kernel Version from the WebScrap
for t in project_href[::2]: for t in project_href[::2]:
KernelURL.append("https://archive.archlinux.org/packages/l/linux/"+t)
KernelVer = os.popen("echo " + t + " | cut -d'.' -f1,2,3 | sed 's/.arc//g' | sed 's/-x86_64//g' | sed 's/.ar//g' | sed 's/h//g'") KernelVer = os.popen("echo " + t + " | cut -d'.' -f1,2,3 | sed 's/.arc//g' | sed 's/-x86_64//g' | sed 's/.ar//g' | sed 's/h//g'")
for i in KernelVer.read().split('\n')[::2]: for i in KernelVer.read().split('\n')[::2]:
KernelVerList.append(i) KernelVerList.append(i)