Skip to content

tweets with line breaks or new lines  #228

@jbabbin

Description

@jbabbin

Parsing out my streaming timeline I've noticed that some tweets have new lines (\n) or carriage returns inside of the tweet field.
Can a flag or option be placed inside 't' to remove any new lines or carriage returns or line breaks from the tweet message field itself?

Here's an example (executing as 't stream timeline -c |' )

ORIGINAL TWEET: https://twitter.com/qualys/status/517738519104454656

I'm splitting on the comma's for fields and when I get a field length of 1 I know that the previous line is likely to be a count of 4 and was split on a line break or new line from the streaming data.

ERRORLINE DEBUG Size [5]
DATA [517738519104454656,2014-10-02 18:10:56 +0000,qualys,"SANS @ RISK week 39, 2014: Consensus Security Vuln Alert w/ analysis of latest vulns & remediation advice https://t.co/tT3n25DIEb"]
RAWDATA [517738519104454656,2014-10-02 18:10:56 +0000,qualys,"SANS @ RISK week 39, 2014: Consensus Security Vuln Alert w/ analysis of latest vulns & remediation advice https://t.co/tT3n25DIEb"]

ERRORLINE DEBUG Size [1]
DATA [http://t.co/LYNdHgjCEm http://t.co/GSI63qI7tc"]
RAWDATA [http://t.co/LYNdHgjCEm http://t.co/GSI63qI7tc"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions