Skip to content

Instantly share code, notes, and snippets.

@ranlo
Last active November 16, 2023 15:47
Show Gist options
  • Save ranlo/fa11c0aea9f40ca1c89a13f693a6fb08 to your computer and use it in GitHub Desktop.
Save ranlo/fa11c0aea9f40ca1c89a13f693a6fb08 to your computer and use it in GitHub Desktop.
jq -c ".log.entries[].response.content" $1 | grep "application/json" | grep search_by_raw_query| jq .text | sed "s/\\\n/|/g" | while read p; do printf %b "$p\n" >> bots_0_json; done;
LC_ALL=C sed 's/^"//g' bots_0_json | LC_ALL=C sed 's/"$//g' > bots_0_json_noquote
sed "s/\\\\\\\\\\\\//g" bots_0_json_noquote | LC_ALL=C jq -c ".data.search_by_raw_query.search_timeline.timeline.instructions[].entries[]" |grep -v promoted-tweet | jq .content.itemContent.tweet_results.result.core.user_results.result > bots_0_users
jq .legacy bots_0_users | jq -c "[.name,.screen_name,.created_at,.location,.followers_count,.friends_count,.statuses_count,.media_count]" | sort | uniq > uniq_users
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment