-
Notifications
You must be signed in to change notification settings - Fork 274
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
Wraps long URLs #38
Comments
I label this as @stefanor Thanks for follow up on this. Please feel free to open up/forward issues/bugs from |
Took me a while to find that parser = HTML2Text()
parser.body_width = 0
parser.handle(value) |
Hey @jmagnusson @stefanor Do you think we can apply the same into htmltext without explicitly set |
@stefanor does this fix help? |
Yeah, combined with |
I'm going to close this then, thanks for your awesome collaboration on this ;) |
This issue still happens to me when the link contains special characters like "-". Are there anyway to rebuild this package with BODY_WIDTH = 0 (config.py) ? |
@nguyenl95 have you consider |
@Alir3z4 I intend to use html2text as lib instead of command-line. I use this lib for my crawler (this case seems popular), and I think def html2md(raw):
h = html2text.HTML2Text()
h.body_width = 0
h.baseurl = "https://example.org" # this is hidden
return h.handle(raw) |
@nguyenl95 Thanks for mentioning. I'd love to see a pull request for updating the documentation so other can see and use it.
Let me know if I can help you with anything else. |
@Alir3z4 Actually there is one feature I think of. It is the limit of output, my forum platform doesn't allow my crawler to post the content over 32000 characters. |
@nguyenl95 Great, feel free to make a feature request or even better a pull request, I would love to know more about it. |
Forwarding aaronsw/html2text#7, so it doesn't get forgotten:
Forwarding http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=616090:
Long URLs are wrapped, which they probably shouldn't be.
Example:
Results in:
The text was updated successfully, but these errors were encountered: