You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue with the deutschland package while trying to fetch financial reports using the Bundesanzeiger class. When running my tests, I received a TypeError indicating that a 'NoneType' object is not subscriptable. This occurs in the __generate_result method when trying to access the captcha_wrapper div.
Error Details
TypeError: 'NoneType' object is not subscriptable
Steps to Reproduce
Initialize the Bundesanzeiger class.
Call the get_reports method with a valid search term.
Observe the error in the __generate_result method.
Code Snippet
Here is the relevant part of the code where the error occurs:
thank you for the detailed description. From the error I would assume the captcha was either removed or the site structure changed. If its number one, we can simply take out the test.
I removed the following section and I was able to retrieve a result.
fromdeutschland.bundesanzeigerimportBundesanzeigerba=Bundesanzeiger()
# search termdata=ba.get_reports("Deutsche Bahn AG")
# returns a dictionary with all reports found as fulltext reportsprint(data.keys())
With results: dict_keys(['4442fe462193acf9a4bf741516a00dfa'])
The question is if this works for all cases, or if the captcha still appears with a changed structure. In that case we would need to adapt the detection of the captcha.
Description
Hi,
I encountered an issue with the
deutschland
package while trying to fetch financial reports using theBundesanzeiger
class. When running my tests, I received aTypeError
indicating that a 'NoneType' object is not subscriptable. This occurs in the__generate_result
method when trying to access thecaptcha_wrapper
div.Error Details
Steps to Reproduce
Bundesanzeiger
class.get_reports
method with a valid search term.__generate_result
method.Code Snippet
Here is the relevant part of the code where the error occurs:
Additional Information
deutschland
package version: latestLogs
Please let me know if further information is needed.
Thank you!
Christian
The text was updated successfully, but these errors were encountered: