adrianodds / olx.pt_crawler

Olx.Pt Crawler
3 stars 0 forks source link

Setup issue #1

Closed mati4458 closed 1 year ago

mati4458 commented 1 year ago

Could you help me set this crawler? I have submitted Gmail email and password in olx_funcoes.py, enabled everything as shown: image image image image

I still get:

<Element html at 0x191e61f9400> <Element html at 0x191e6c3a900> <Element html at 0x191e6ce9d00> Em execução.. Traceback (most recent call last): File "C:\Users\werom\OneDrive\Pulpit\olx.pt_crawler-main\main.py", line 44, in olx_funcoes.email(olx_funcoes.enderecos_email(),(f"Corre!!! OLX! - {titulo + ' - ' + valor}"), (f"{corpo_email}")) File "C:\Users\werom\OneDrive\Pulpit\olx.pt_crawler-main\olx_funcoes.py", line 30, in email smtp.login(email_address, email_passowrd) File "C:\Python310\lib\smtplib.py", line 750, in login raise last_exception File "C:\Python310\lib\smtplib.py", line 739, in login (code, resp) = self.auth( File "C:\Python310\lib\smtplib.py", line 662, in auth raise SMTPAuthenticationError(code, resp) smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials 24-20020ac24838000000b004a2550db9ddsm1795003lft.245 - gsmtp')

adrianodds commented 1 year ago

Olá mati4454, é necessário gerar um token para que seja possível enviar e-mail por Gmail, para isso, a verificação de duas etapas deve estar ativa. Em seguida, nas configurações de segurança da sua conta google, logo abaixo da verificação por duas etapas está a opção senhas de app:

basta acessar essa opção, gerar um token e informar no campo password do código.

image image

mati4458 commented 1 year ago

Thanks a lot, now it works flawlessly!