How to scrape encrypted emails from a website
Decoding encrypted emails on a website can be a daunting one. Especially if you have to write the logic to crack it up yourself. But you are in luck because I have already written that code for you. So yours is to copy it and amend it to your advantage.
Most encrypted emails will be contained in;
data-cfemail
As part of the 'a' tag link.
So the most suitable option for you will be to store the data-cfemail (encrypted email) into a variable and pass it into the email decryptor code below. So your code should look something like this after doing that;
email = email.find('a')['data-cfemail']
email = str(email)
Once that's sorted pass email into the decryptor as shown here;
def decode(encodedEmail):
r = int(encodedEmail[:2], 16)
email = ''.join([chr(int(encodedEmail[i:i + 2], 16) ^ r) for i in range(2, len(encodedEmail), 2)])
return email
print(decode(str(email)) )
If you are an intermediate python developer study the code above, copy and paste into your IDE and manipulate it to see how it functions. You should be familiar with regex.
Today is your lucky day! You just decrypted the email(s).
If you need assistance with your projects feel free to email me at info@airgad.com or whatsapp Jesse stay safe!