Skip to content

res_array[0] out of range error #1

Open
@GoblinGe

Description

@GoblinGe

If the text to be translated includes \r or \n, the error occurs when using google platform. This is because the code in translate_google.py does not match \r or \n.
Add "| re.DOTALL" in line 56 to fix this problem.

target_text = re.findall(r'id="tw-answ-target-text">(.*?)', res_text, flags=re.IGNORECASE | re.DOTALL)

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