Open alencinafaa opened 3 years ago
Just change store discovery for WapQuery, getting wrong reference.
{ id: "WapQuery", conditions: (module) => (module.default && module.default.queryExist) ? module.default : null },
Just change store discovery for WapQuery, getting wrong reference.
{ id: "WapQuery", conditions: (module) => (module.default && module.default.queryExist) ? module.default : null },
Dear @imamsy, thanks for you answer.
I'm not very expert, so I'm not sure if I do what I must do...
The only place where I can perform such change, which results in correcting the error, was in:
C:\ProgramData\Anaconda3\Lib\site-packages\webwhatsapi-2.0.3-py3.8.egg\webwhatsapi\js\wapi.js at line 22,
replacing the line:
{ id: "WapQuery", conditions: (module) => (module.queryExist) ? module : ((module.default && module.default.queryExist) ? module.default : null) },
with that you have given.
Is what I did okay? Was that what you suggested to me?
I'll appreciate your response.
I'm using Windows 8, Python 3.8.3 (default, Jul 2 2020, 17:30:36) [MSC v.1916 64 bit (AMD64)], Mozilla Firefox 88.0.1and geckodriver 0.29.1, and installed webwhatsapi via pip (pip install webwhatsapi) on May 30, 2021.
Then, I use check_number_status function wthout problems, returning "200" or "400" according to the phone_id status.
Today (Jun 11, 2021) I only get "{}".
Assuming a wsp update on my Android phone could modify something, I downgraded my wsp to version 2.21.10.15, but the problem remains.
My code:
from webwhatsapi import WhatsAPIDriver
driver = WhatsAPIDriver(loadstyles=False)
phone_safe = heremynumber # Phone number with country code
phone_whatsapp = "{}@c.us".format(phone_safe)
aaa=driver.check_number_status(phone_whatsapp)
aaa.status
Returns: {}
Any hint?