Skip to content

Commit

Permalink
Merge pull request #50 from ssenart/develop
Browse files Browse the repository at this point in the history
[#49] Authentication failure
  • Loading branch information
ssenart committed Jul 11, 2022
2 parents ca1dd1c + a7a288c commit d6fe2d9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.5](https://github.com/ssenart/PyGazpar/compare/1.1.4...1.1.5) - 2022-07-11
### Fixed
- [#49](https://github.com/ssenart/PyGazpar/issues/49): Authentication failure.

## [1.1.4](https://github.com/ssenart/PyGazpar/compare/1.1.2...1.1.4) - 2022-01-18
### Changed
- [#43](https://github.com/ssenart/PyGazpar/issues/43): Downloaded Excel file name has changed from Donnees_informatives_PCE_$dateDebut_$dateFin.xlsx to Donnees_informatives_$numeroPCE_$dateDebut_$dateFin.xlsx.
Expand Down
3 changes: 3 additions & 0 deletions pygazpar/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from pygazpar.datafileparser import DataFileParser

LOGIN_URL = "https://login.monespace.grdf.fr/sofit-account-api/api/v1/auth"
LOGIN_HEADER = {"domain": "grdf.fr"}
LOGIN_PAYLOAD = """{{
"email": "{0}",
"password": "{1}",
Expand Down Expand Up @@ -94,6 +95,8 @@ def __updateLiveMode(self):

session = requests.Session()

session.headers.update(LOGIN_HEADER)

self.__login(session)

# Build URL to get the data from.
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
openpyxl
requests
pytest

0 comments on commit d6fe2d9

Please sign in to comment.