Python Forum
requests problem in python script "content type"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
requests problem in python script "content type"
When I want to check the e-mail, it is on the site or not, and even though the e-mail is there, it tells me there is no!
Existing email is: [email protected]

Where is the problem perhaps in request data or not recognizing the text in success_keyword !!
import requests

def faild(email,):
    print(f"login is faild {email}")
def passed(email,):
    print(f"login is true {email}")

def checker(data,):
    email = data[0]
    success_keyword = "Veuillez entrer une adresse électronique valide"
    http ="", data={"email":email,"submit": "Submit"}).text
    content = http.content
    if success_keyword in content:
combos_name = input("Please Enter combo name:")
combos = open(combos_name, "r").readlines()
arranqe = [lines.replace("\n", "")for lines in combos]
for lines in arranqe:
    data = lines.split(":")
always show full unmodified error traceback. It contains valuable information.
this error :
line 14, in checker
if 'Veuillez entrer une adresse électronique valide' in str(http.content):
AttributeError: 'str' object has no attribute 'content'
Remove .text end of line 12.
But looking at site so will this not work.
This is from data send:
email: [email protected]
ba1aadd6: 4xxxx
_nnc: 3:15xxxxxxxx
submit: Submit
So need to parse out this values or it will not work.
I think using selenium will be easier here,then should not need to find these values.

How setup for Requests would look.
import requests
from bs4 import BeautifulSoup
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36'
# Need to first find ba1aadd6 and _nnc vaules first
params = {
    email: [email protected]
    ba1aadd6: 4xxxx
    _nnc: 3:15xxxxxxxx
    submit: Submit
with requests.Session() as s:'', headers=headers, params=params)
    # logged in! session cookies saved for future requests
    response = s.get('')
    # cookies sent automatically!
    # Example send to BS
    soup = BeautifulSoup(response.content, 'lxml')
    #welcome = soup.find('title').text
I want to create an email course
Each time he tries an email and returns to the second one until he finishes
for loop in "checkemail.send_keys(email)" looping in email ..
from selenium import webdriver
list = input("Input Mail List :")
list = open(list, "r").readlines()

driver = webdriver.Chrome()

checkemail = driver.find_element_by_xpath('//*[@id="content"]/div/div/div/div[2]/form/div/input[1]')
loginButton = driver.find_elements_by_css_selector("#submit-button")
if """<span class="inline-input-error-message" style="display:inline">Veuillez entrer une adresse électronique valide.</span>""" in checkemail:
    print("\033[31;1mDIE\033[0m | " + email + " | [(Checked)]")
    die.write(email + '\n')
    print("\033[32;1mLIVE\033[0m | " + email + " | [(Checked)]")
    live.write(email + '\n')

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with logging in on website - python w/ requests GoldeNx 6 764 Sep-25-2020, 10:52 AM
Last Post: snippsat
  How to perform a successful login(signin) through Requests in Python Kalet 1 933 Apr-24-2020, 01:44 AM
Last Post: Larz60+
  Scraping problems with Python requests. gtlhbkkj 1 570 Jan-22-2020, 11:00 AM
Last Post: gtlhbkkj
  requests problem abdlwafitahiri 1 562 Dec-26-2019, 12:18 PM
Last Post: buran
  "I'm Feeling Lucky" script problem (again) tab_lo_lo 7 4,774 Jul-23-2019, 11:26 PM
Last Post: snippsat
  Wierd file type problem Larz60+ 4 1,298 Nov-25-2018, 07:59 PM
Last Post: Larz60+
  Inserting multiple cookies using python requests freshtomatoes 0 2,739 Aug-16-2018, 09:25 PM
Last Post: freshtomatoes
  How to clean html content using BeautifulSoup in Python 3.6? PrateekG 5 6,073 Apr-27-2018, 01:14 PM
Last Post: snippsat
  Problem With Simple Multiprocessing Script digitalmatic7 11 5,193 Apr-16-2018, 07:18 PM
Last Post: digitalmatic7
  Python requests to loop over the list and click button Prince_Bhatia 5 11,816 Oct-27-2017, 01:34 PM
Last Post: Prince_Bhatia

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020