Skip to content
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

Dynamic headers for making API calls to NSE #51

Closed
jitendravarma opened this issue May 2, 2024 · 4 comments
Closed

Dynamic headers for making API calls to NSE #51

jitendravarma opened this issue May 2, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@jitendravarma
Copy link
Contributor

Right now I see that we have fixed headers for making api requests to NSE. Problem with this is, if many users are requesting the NSE api, then NSE blocks the given headers. So no new reqports file will be downloaded for same headers.

Solution that I like to propose it, to use python header faker library to mock headers and then shoot request. That way all different users will have their own set of headers and wont get blocked.

Library: https://pypi.org/project/fake-headers/

@pratik141 pratik141 added the enhancement New feature or request label May 2, 2024
@pratik141
Copy link
Owner

pratik141 commented May 2, 2024

Good suggestion

Library: https://pypi.org/project/fake-headers/

This library is in a stale state.
Need to find a different one.

or I will add some random headers

@jitendravarma
Copy link
Contributor Author

Added working fake headers logic to the get_headers function.

@pratik141
Copy link
Owner

Link #50

@pratik141
Copy link
Owner

Some warning are coming in py 3.11 need to fix later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants