Hi,
Thanks for the info provided by PassMark! That helps me to find my most wanted CPU to build my PC.
I want to buy a powerfull CPU, but in efficiency meanwhile.
But in the Power Performance page, the TDP/Rating/Core/Thread numbers are not shown and cannot sort/filter them.
So I create a python script to sort/filter them:
And got the result:
But I cannot get other basic info, such as Core / Thread numbers.
So is there a Web Api to get such info without parsing raw html?
Thanks!
Thanks for the info provided by PassMark! That helps me to find my most wanted CPU to build my PC.
I want to buy a powerfull CPU, but in efficiency meanwhile.
But in the Power Performance page, the TDP/Rating/Core/Thread numbers are not shown and cannot sort/filter them.
So I create a python script to sort/filter them:
Code:
@dataclass class CPU: name: str cores: int = 0 threads: int = 0 tdp: float = 0 rating: int = 0 url: str = '' def power_perf(): url = 'https://www.cpubenchmark.net/power_performance.html' soup = BeautifulSoup(requests.get(url).content, 'html.parser') if allcpu := soup.find('div', {'id': 'allcpu'}): for cpu in allcpu.find_all('li'): name = cpu.find('span', {'class': 'prdname'}).text href = 'https://www.cpubenchmark.net/' + cpu.find('a').get('href') details = cpu.find('span', {'class': 'more_details'}) items = re.split(r'\s*,\s*', details.get('onclick')[2:-2]) rank, rating, tdp = int(items[1]), int(items[6][1:-1]), float(items[7][1:-1]) yield rank, CPU(name, rating=rating, url=href, tdp=tdp)
But I cannot get other basic info, such as Core / Thread numbers.
So is there a Web Api to get such info without parsing raw html?
Thanks!
Comment