Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #201553
    osuteye
    Participant

    Whenever I run this script I had this error depicts below the script.

    # usr/bin/env python
    import requests
    url=”google.com”
    get_response = requests.get(“https://”+url)
    print(get_response)

    ERROR
    import requests
    ModuleNotFoundError No Module name ‘requests’

    Please assist.
    Thanks

    #201560
    Diego PérezDiego Pérez
    Moderator

    Hi!
    Are you running the code in custom kali?

    Greetings!
    Diego

    #201563
    osuteye
    Participant

    YES.

    #201582
    Diego PérezDiego Pérez
    Moderator

    Hi!
    Can you share a screenshot with the command used to run it?

    Thanks!
    Diego

    #201620
    osuteye
    Participant

    Please find attached the file requested.
    Thanks

    Attachments:
    You must be logged in to view attached files.
    #201628
    Diego PérezDiego Pérez
    Moderator

    Hi!
    The error in the screenshot has nothing to do with what you have described before, can you explain?
    And share your script please.

    Greetings!
    Diego

    #201635
    osuteye
    Participant

    Initial when I run the script I had the message
    ERROR
    import requests
    ModuleNotFoundError No Module name ‘reques

    Then I run this commmand at the terminal to install the request mudole

    pip install requests

    this is before I run the script again.

    This is the script

    # usr/bin/env python
    import requests
    url=”google.com”
    get_response = requests.get(“https://”+url)
    print(get_response)

    #201654
    Diego PérezDiego Pérez
    Moderator

    Hi!
    Is your kali properly connected to internet? Can you open firefox and surf the web?

    Greetings!
    Diego

    #201697
    osuteye
    Participant

    Yes. I am browse the internet from the Kali Linux Firefox
    Check the attached file.
    Thanks

    Attachments:
    You must be logged in to view attached files.
    #201702
    Diego PérezDiego Pérez
    Moderator

    Hi!
    The error is related to a network issue, can you try to type the full URL in the request? I mean avoid concatenating the variable and https://.

    Let me know how it goes!
    Diego

    #201749
    osuteye
    Participant

    It works.
    Thanks

    Attachments:
    You must be logged in to view attached files.
    #201761
    Diego PérezDiego Pérez
    Moderator

    Hi!
    Cool, it is working fine. Now try to split the protocol and the domain name once again.

    Greetings!
    Diego

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.