-
Notifications
You must be signed in to change notification settings - Fork 0
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
HackerTarget API is broken #5
Comments
You don't need to supply the URL as a parameter but, if you do, make sure you pass the full URL as in "https://api.hackertarget.com" (which is the predefined value) |
I am not supplying any parameters to it. This is all being done in your repo. |
I've just reviewed the code and I'm still failing to reproduce the issue you mention. The following code works perfectly and returns all known subdomains for github.com:
You can also run the tests for the API and see that they all pass. |
Access by field name of the namedtuple that created the problem was replaced with access by index. The issue was generated by an implementation bug in CPython as described in the following conversation: python/cpython#100098 |
Hey, I think a change you did in the HackerTarget API has caused it to break.
In the commit adef087 you moved the URL to Enum. When I call the API now I get the following error:
HackerTarget.URL.value.scheme,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'scheme'
This happens in the function
self.get_query_url
of the API. In the return of the function you are usingurlunparse
, and the first 2 parameters areHackerTarget.URL.value.scheme
andHackerTarget.URL.value.netloc
. SinceHackerTarget.URL.value
is a tuple, it doesn't recognise.scheme
and.netloc
.Proposed Change
You can use
HackerTarget.URL.value[0]
andHackerTarget.URL.value[1]
instead of.scheme
and.netloc
respectively.I wasn't sure if you want to do that or you want to find a better solution, so I didn't make a Pull Request.
The text was updated successfully, but these errors were encountered: