-
Notifications
You must be signed in to change notification settings - Fork 559
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
module has no object Shodan #4
Comments
Please make sure you're running the latest version of the Shodan Python library. The "Shodan" class is the wrapper for the new REST API that is documented at https://developer.shodan.io whereas "WebAPI" is the wrapper for the old/ deprecated API at http://docs.shodanhq.com The "Shodan" class is implemented in the shodan.client module, and it gets automatically imported to the shodan module so you don't need to do anything extra. I.e. this works with the latest code: import shodan If it doesn't work then you're not using the latest version of the library, in which case try to run "easy_install -U shodan". |
Getting same issue using the newest version and following Shodan docs. |
Make sure the name of your script isn't "shodan", otherwise it will conflict with the library's name. |
Yep that was it, cheers! |
Please change the file name shodan.py to python_test.py or etc |
@achillean Still helping people nearly 5 years later. The lesson (and error) being unrelated to shodan specifically now that I consider this more. It's a good thing to remember when naming my python files and using any modules. :) |
In the implementation of the basic search example, using shodan.Shodan(SHODAN_API_KEY) throws an error.
I think it should be shodan.WebAPI(SHODAN_API_KEY)
The text was updated successfully, but these errors were encountered: