Aug-18-2020, 05:01 PM
I can't confirm this will work, since I don't have your original (non-ascii) file, but this code does the reads/compares in binary and works on the ascii snippet you gave.
b64link = b"aHR0cDovL3d3dy5ib29tbGluZ3MuY29tL2RhdGFiYXNlL2Rvd25sb2FkR0pMZXZlbDIyLnBocA==" with open("ascii.txt", 'rb') as f: t = f.read() if(b64link in t): location = t.find(b64link) print(location)
Output:456