اذهب إلى المحتوى

Abdullah Mtiri

الأعضاء
  • المساهمات

    7
  • تاريخ الانضمام

  • تاريخ آخر زيارة

أجوبة بواسطة Abdullah Mtiri

  1. بتاريخ 9 دقائق مضت قال Mustafa Suleiman:

    أين الكود وما هي المكتبة التي تستخدمها هل تستخدم BeautifulSoup؟

     

    نعم استخدم "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 .. هل هي مسجله؟ ام لا؟  

  2. مرحبا !

     

    احتاج إلى مساعدة من فضلكم

    قمت بتصميم كود بايثون عبر الذكاء الإصطناعي

    الكود جيد ولا توجد به اي مشكله

    كل مافي الامر عندما اقوم بتشغيل الكود

    يقول لي "Unable to extract the email input field"

    علماً ان الصفحه الموجه لها لايوجد بها الا مدخل واحد وهو الـ email ماهو الحل ؟

     

    هل استخرج الحقل مباشرة من الرابط

  3. بتاريخ 1 ساعة قال Haroun Taha:

    يمكنك فعل ذلك من خلال لغة بايثون بإستخدام split :

    
    txt = "aaa:123"
    
    data = txt.split(":")

    بعد ذلك سوف تكون قيمة المُتغير data عبارة عن قائمة من ['aaa','123'] يمكننا حفظها في ملف نسميه output بإمتداد txt:

    
    with open("output.txt", "w") as txt_file:
        for line in data:
            txt_file.write(" ".join(line) + "\n")

     

    رائع !

    شكرا لك ، ولكن ماذا لو أردت إدخال لسته كامله txt بدلاً من aaa:123

    وأيضا هل يمكنني عمل output 2

    يعني : 

    Output1 = aaa

    Output2 = 123

  4. مرحبا،

     

    ارغب بتعلم البايثون منذ فترة طويله، ولكن سمعت ان البايثون له مجالات كثيرة ومُتعددة ، واغلب ما قرأته مثل تطوير التطبيقات والمواقع وماشابه لا تهمني ابدا !

    ارغب بتعلم صنع سكربتات بسيطه تقوم بمهامه مُعينه

    وتشتغل عبر تطبيق Pythonista 3 على الإيفون

    وادوات تخص برامج التواصل الاجتماعي وايضا جمع المعلومات من قوقل "كشط"وماشابه

     

    أفيدوني ماذا اتعلم بالظبط في بايثون لـ أصل إلى ما ارغب

    وشكرا

    • أعجبني 2
×
×
  • أضف...