Skip to content

Issue Resolved and Library Updated #39

@B16f00t

Description

@B16f00t

Description
I'm encountering an issue with the dnsdumpster library while attempting to perform a data lookup. The error occurs when running the following code:

from dnsdumpster.DNSDumpsterAPI import DNSDumpsterAPI
results = DNSDumpsterAPI().search('microsoft.com')
print(results)

Error Message
The generated error is as follows:

Traceback (most recent call last):
File "my_script.py", line 2, in
results = DNSDumpsterAPI().search('microsoft.com')
File "...\site-packages\dnsdumpster\DNSDumpsterAPI.py", line 72, in search
csrf_middleware = soup.findAll('input', attrs={'name': 'csrfmiddlewaretoken'})[0]['value']
IndexError: list index out of range

Observations

The issue seems related to the csrfmiddlewaretoken attribute not being found in the server's response. This might indicate a change in the HTML structure of the website the library relies on.
I tried making a direct request to the website, and it appears the HTML format may have changed.

Request
Is there an update to the library or a temporary fix for this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions