Comments (15)
I do not recommend playing with Edistribucion backend in that way, as you'll be surely banned forever if anomaly activity is detected.
Said that, you can emulate what you asking for by removing/renaming edistribucion.access
and edistribucion.session
, which contain access credentials granted by the backend and session variables, all tied to the credentials set in credentials.py
. If you rename both files and call a method (get_cups()
or whatever), the API will login again by taking the user/password set in credentials.py
. Therefore, you can alternate between a collection of *.access
and *.session
files to switch between users' portal.
Despite that, I would recommend you the correct way. Edistribucion has the capability to grant access to external users. For instance, an external user can grant you access to its portal and you will be able to access to its portal, all available with your own user/password. More info at https://zonaprivada.edistribucion.com/areaprivada/s/wp-authorizations
from edistribucion.
Aha!! Thanks a lot for all this information. I wasn't aware of that access for external. It will really help.
Again, thank you so much for being so quick and resolute responding.
from edistribucion.
Sorry to disturb again...
I got authorization to access as a external user. Through web I see the CUPS of the person that grant access to me. But using this API I don't :( . For example, 'edis.get_list_cups()
' returns an empty array...
Is it possible to access authorized cups with this API?
Thank you so much.
PS: I'm not sure if this is the place to ask for this help.... Please, let me know
from edistribucion.
Do get_all_cups()
or get_cups()
return something?
from edistribucion.
They return something, but 'authorized' cups are not there
from edistribucion.
Just to give a hint...
In order to see the authorized cups on web site, I have to choose the proper "persona o razón". Maybe that's what we need to do somewhere inside the API code.
from edistribucion.
I do not have a way to scrap multiple identities, but let me try one approach.
Can you paste what do you get on get_login_info()
? Please anonymize it before pasting here.
from edistribucion.
Note that:
- I've changed all ids by replacing the last characters with '????'
- I've changed names and DNIs
- I have authorization from 2 users. But, in 'authList[0]' is myself (don't know why). 'authList[1]' is ok
from edistribucion.
Hi! Did you find any way to do it? Thank you.
from edistribucion.
from edistribucion.
Thank you for this great job!
Related to this, Can be avoided the load of credentials.py? I mean, this behaviour obligate to have a credentials.py in the working directory. I think that insted is better to have a login(user,passwd) method. More flexible for integrations
from edistribucion.
I pushed a new version with identities management. Now methods related with CUPS accept vis
parameter. This parameter can be obtained via get_identities()
, which will return a list of authorized supplies. If no parameter is provided, it takes the default identity.
Also Edistribucion()
accept login
and password
arguments. If not provided, both are taken from credentials.py
file.
Finally, no need to call login()
, as it is called inside the initialization.
Refer to example3.py
for examples on identity management.
Note: I cannot not test identity management, as I do not own other supplies nor other people grants access to me. So, please report if you detect inconsistencies.
from edistribucion.
I tried Edistribucion(login=user,password=password) but fail if not credentials.py exists in the working directory. May you catch the import error?. I mean:
try:
import credentials
except:
logging.warning("No credentials.py file found")
Thanks for suporting!
from edistribucion.
from edistribucion.
Hi!
I've just tried this new version 0.6.0 with my user and access to others.
It works perfectly!
Thank you so much!!
from edistribucion.
Related Issues (20)
- Getting an login error HOT 2
- Mensaje: "En este momento no podemos conectar con tu contador" HOT 1
- Functions not working HOT 4
- CUPS online data HOT 4
- Changes in the ENDESA web page. login fail HOT 7
- Exception on "get_meas_interval()" -> 'lstData' HOT 1
- Reconectar ICP HOT 2
- How to get 'poured energy'? ("energía vertida") HOT 1
- Error connecting to e-Distribución HOT 1
- Seemingly can't login HOT 8
- Error <<argument of type 'NoneType' is not iterable>> HOT 4
- token methode as changed HOT 8
- New funtion to get data between two dates. HOT 5
- setting a rol HOT 3
- EdistribucionAPI.Edistribucion.EdisError: token not found. Cannot continue HOT 2
- Force Login Error HOT 3
- json como única salida. HOT 4
- Errores en la página de Endesa? HOT 2
- Meter metrics not working anymore HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edistribucion.