-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pytr dl_docs shows new documents but does not download them #70
Comments
i got the following error since yesterday (pytr 0.1.9 on macOS 14.5)
|
Hi, pytr Version 0.1.9 thanks |
TR changed something... hope someone fixes pytr soon, love this tool :) |
Hi, I just noticed, that this program still can DL die PDF of "Rechnung" before june 10th, and everything else, but starting on june 10th it can DL everything except the "Rechnung". No idea what changed. I viewed the DL links, and they totally look the same. thanks |
Hi, I also have that issue that pdfs are not downloaded for
I see some entries like
but no pdfs. However, if I also checked my stock saving plans (Sparplan) in TR app (iOS) and can't find any recent "Abrechnung Ausführung" document in those plans for this month. Only for last month (and before). My assumption would be that those are not yet available, might be related to current technical issues/problems of TR 🤷♂️ |
Hi @matawed , The ones before 8th june can be DL by pytr, the ones since 10. june cannot be DL by pytr. In the TR web everything is there (manual work, we should invoice TR :-) ) thanks |
Hi @Lebensform123 , Sorry, I have no clue in programming python. If you tell my how to get the Data from TR, I could look into my data, and maybe I can find some hints. It seems, we somehow have to revers engeneer this. How hard would it be to brute force download the PDF? thanks |
after playing around, while not having great success i noticed something: If you open https://app.traderepublic.com/profile/transactions and open the browser network tab there is In api.py we subscribe to 'type': 'timeline' but i couldnt find this type but instead there was 'type': 'timelineTransactions', after changing the parts, there was some data to recieve. # api.py
...
async def timeline(self, after=None):
#return await self.subscribe({'type': 'timeline', 'after': after})
return await self.subscribe({'type': 'timelineTransactions', 'after': after})
async def timeline_detail(self, timeline_id):
#return await self.subscribe({'type': 'timelineDetail', 'id': timeline_id})
return await self.subscribe({'type': 'timelineDetailV2', 'id': timeline_id})
async def timeline_detail_order(self, order_id):
#return await self.subscribe({'type': 'timelineDetail', 'orderId': order_id})
return await self.subscribe({'type': 'timelineDetailV2', 'orderId': order_id})
async def timeline_detail_savings_plan(self, savings_plan_id):
#return await self.subscribe({'type': 'timelineDetail', 'savingsPlanId': savings_plan_id})
return await self.subscribe({'type': 'timelineDetailV2', 'savingsPlanId': savings_plan_id}) changing the types. # dl.py
if subscription['type'] == 'timelineTransactions':
await self.tl.get_next_timeline(response, max_age_timestamp=self.since_timestamp)
elif subscription['type'] == 'timelineDetailV2':
await self.tl.timelineDetail(response, self, max_age_timestamp=self.since_timestamp)
else:
self.log.warning(f"unmatched subscription of type '{subscription['type']}':\n{preview(response)}") And in the recieved message i got a valid document link as the payload: {
"id": "2ac5zecb-ae38-424f-8a57-55b5cdba65b4",
"sections": [
{...},
{...},
{...},
{...},
{
"title": "Dokumente",
"data": [
{
"title": "Abrechnung Ausführung",
"detail": "20.06.2024",
"action": {
"type": "browserModal",
"payload": "https://traderepublic-data-production.s3.eu-central-1.amazonaws.com/timeline/postbox/2024/6/20/..."
},
"id": "c524ee99-462e-4b9d-bf9c-6be2b932643f",
"postboxType": "SAVINGS_PLAN_EXECUTED_V2"
}
],
"action": null,
"type": "documents"
}
]
} Maybe it helps someone with better python knowledge :D thanks. |
someone can fix this plz :D |
Based on @tcdev0 i continued the reverse engineering of the new data structure returned by TR. As it looks like the structure has been changed in several places (i am not aware how the old structure looked like). I adapted the code and tried to fix the title text and subtitle text as good as possible to generate reasonable pdf names. There are patterns where i have no example (i.e. 'Wertpapierübertrag') and in cases where no title can be found an error 'Unable to detect titleText from response' is reported. In debug mode also the json will be printed which cannot be processed. For now, I checked this with:
There are files which are not downloaded (not sure when this stopped working), for example files in:
Created a pull request here: TBD: The folder structure is based on the "documents/data/tile" which has for example changed for Dividends (old version vs new version). The question is if it would be better to enforce a fixed structure like:
|
Solved for me with the new update to master. Just as a note, new dividend pdfs are in "\Dokumente" and no longer in "\Abrechnung". |
Hi alltogether,
can a kind soul give me a tip, what to do, or "simply" deleting both path and re-installing it new? (I do not want to screw the system up more, than it is already.) thanks |
with |
thx for fixing |
Description of the bug
Starting this week (June 10th 2024) new documents are not downloaded autmatically by "pytr dl_docs". Till last friday (June 7th 2024)
it worked without any issues.
To get more information I tried "pytr dl_docs -v debug" and I see that for the new messages the response from the server seems to look different. Before it looked like this:
Now the only response that there is is:
Can anybody reproduce the issue. Do you have any idea where this comes from?
I do not see what I do different then before. Did something change in the API?
The issue ini the end is that the new files are not being downloaded.
Environment
0.1.9
,The text was updated successfully, but these errors were encountered: