Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

The #jp twitter scraper

Name: eels is a horse fucker 2021-03-25 1:28

#!/bin/sh

if [ -f ./$@-profile ]; then
break
else
twint --user-full -u $@ > ./$@-profile
fi

# Test for presence of $@.json file; continue if present
if [ -f ./$@.json ]; then
twint --json --since $(jq --raw-output -M .date ./$@.json|tail -n1) -u $@ -o $@.json.tmp && tac $@.json.tmp >>$@.json
else
twint --json -u $@ -o $@.json.tmp && tac $@.json.tmp >$@.json && mkdir video && mkdir images
fi

# Download all images
cat $@.json|tr '\" ' '\n'|grep -o -w https://pbs.twimg.com/media/*.*g -|sed -e "s/$/\:orig/g"|wget -nc -i - -P ./images/

# Download all video media
#cat $@.json|grep "\"video\"\: 1"|tr '\" ' '\n'|grep $@/status|youtube-dl -o ./"video/%(id)s.%(ext)s" -i -a -
for video in $(cat $@.json|grep "video_thumb"|tr '\" ' '\n'|grep $(echo $@|tr '[:upper:]' '[:lower:]')/status); do ls $(echo ./video/$(basename $video*)) || youtube-dl -o ./"video/%(id)s.%(ext)s" "$video";done
#video_thumb is grepped as this is more indicative. sometimes twint sets video to 1 even when there's no video attached. haven't determined exact cause.

# Delete temporary file
rm $@.json.tmp

Name: Anonymous 2021-03-25 4:55

It's like you combined the worst part of IRC into the toxicity of Twitter. I love it.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List