Skip to content

Conversation

@Rudd-O
Copy link
Contributor

@Rudd-O Rudd-O commented Feb 22, 2023

Sometimes Yahoo! returns 403. This causes a tuple destructuring error later in parse_response(), when .json() actually does not return anything that can be destructured. The correct defensive behavior is to fail fast and exit here.

For some symbols, there is no data in the return dictionary. This causes a destructuring IndexError. We now correctly handle this.

Finally, there is a problem when using the default requests user agent (Y! always returns 403 in that case). So we use our own agent to make it work.

Sometimes Yahoo! returns 403.  This causes a tuple destructuring error later in `parse_response()`, when `.json()` actually does not return anything that can be destructured.

The correct defensive behavior is to fail fast and exit here.
@Rudd-O Rudd-O changed the title Raise for status when Yahoo! returns 403 Raise for status when Yahoo! returns 403 / use User-Agent header Feb 22, 2023
@Rudd-O
Copy link
Contributor Author

Rudd-O commented Feb 22, 2023

OK! QA passed.

@Rudd-O
Copy link
Contributor Author

Rudd-O commented Feb 22, 2023

Please make a stable release with these fixes. Otherwise Beancount users will not be able to use Yahoo!

@blais
Copy link
Member

blais commented Jun 16, 2024

This is in conflict with current version.
If you can resolve conflicts and fix the tests I'd merge this right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants