Hey FatArnold
here is some crc32 check / then check if new disc or verify disc from redump...
import requests
import zlib
from bs4 import BeautifulSoup
#fn needs to be set from GUI
buffersize = 65536
with open(fn, 'rb') as afile:
buffr = afile.read(buffersize)
crcvalue = 0
while len(buffr) > 0:
crcvalue = zlib.crc32(buffr, crcvalue)
buffr = afile.read(buffersize)
crc = (format(crcvalue & 0xFFFFFFFF, '08x'))
#print (crc)
url1 = "http://redump.org/discs/quicksearch/"
r = requests.get(url1 + crc)
r.encoding = 'utf-8'
soup = BeautifulSoup(r.text, 'html.parser')
soup2 = soup.find_all('title')
soup3 = [e.get_text() for e in soup2]
if str('Discs') in str(soup3):
print ("This disc is a new entry to Redump DB!")
else:
print ("This disc can be used to verify a Redump DB entry")