Skip to content

Filename truncation. #68

Description

@LesPrimus

Hi

I noticed some truncation of the filename after the download locally. For example, password.py became assword.py .

In my opinion, the bug resides in the strip method in this line: file_name = soup.find(id="filename").text.strip(".py").

The str.strip() method returns a copy of the string with the leading and trailing characters removed.

A better alternative, in my opinion, would be str.removesuffix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions