نعم استخدم "BeautifulSoup"
هذه هو الكود :
import requests
from bs4 import BeautifulSoup
# Function to check if the email is registered on Instagram
def check_email(email):
url = "https://www.instagram.com/accounts/password/reset/?source=fxcal"
try:
# Sending a GET request to the URL
response = requests.get(url)
# Parsing the HTML content using BeautifulSoup
soup = BeautifulSoup(response.text, "html.parser")
# Extracting the input field where the email is entered
email_input = soup.find("input", {"name": "email"})
# Checking if the email input field exists
if email_input:
# Checking if the value of the email input field matches the given email
if email_input.get("value") == email:
return "Email is registered on Instagram"
else:
return "Unable to extract the email input field"
except requests.exceptions.RequestException as e:
return f"Error: {e}"
return "Email is not registered on Instagram"
# Reading the emails from a text file
with open("emails.txt", "r") as file:
emails = file.readlines()
emails = [email.strip() for email in emails]
# Checking each email
for email in emails:
result = check_email(email)
print(f"{email}: {result}")
وهذه هو الرابط المقصود :
https://www.instagram.com/accounts/password/reset/?source=fxcal
الفكرة :
يقوم الكود بفتح الصفحه وثم يقوم بفحص الإيميلات الموجوده مسبقا في txt .. هل هي مسجله؟ ام لا؟