Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

browser.get_form - forms with a text area returns a prefixed \r when empty and \r\rn when filled #63

Closed
tanner-pm opened this issue Apr 28, 2016 · 2 comments

Comments

@tanner-pm
Copy link

I am running into an issue with forms that have text areas. When grabbing the form using browser.get_form all blank text areas return a \r and when submitted now have a new line.

Also, all non-blank text areas are prefixed with a \r\n to the front of it when pulling the form.

@JoabMendes
Copy link

Have you tried to use .strip() over the field return?
I normally use it to clean the string return from tables or inputs while scrapping.

>>> string = "\n\rHello World"
>>> string
'\n\rHello World'
>>> string.strip()
'Hello World'
>>> 

@tanner-pm
Copy link
Author

Yep. That's what I ended up doing. Thanks for the reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants