GithubHelp home page GithubHelp logo

mmpx12 / twitter-media-downloader Goto Github PK

View Code? Open in Web Editor NEW
556.0 10.0 67.0 91 KB

twmd: CLI/GUI Apiless twitter downlaoder. Download medias from single tweet or a whole profile.

Makefile 2.19% Go 97.81%
twitter twitter-downloader downloader go golang termux termux-tools gui

twitter-media-downloader's Introduction

twmd: CLI & GUI twitter media downloader (without api key)

This twitter downloader doesn't require Credentials or an api key. It's based on twitter-scrapper.

Unfortunately, you will not be able to download more than 3200 tweets.

gui

usage:

Usage:
-h, --help                   Show this help
-u, --user     USERNAME      User you want to download
-t, --tweet    TWEET_ID      Single tweet id to download
-n, --nbr      NBR           Number of tweets to download
-i, --img                    Download images only
-v, --video                  Download videos only
-a, --all                    Download images and videos
-r, --retweet                Download retweet too
-z, --url                    Print media url without download it
-R, --retweet-only           Donwload only retweet
-s, --size     SIZE          Choose format between small|normal|large
                             (default large)
-U, --update                 Download missing tweet only
-L, --login                  Log in to your account
-P, --login-plaintext        Plain text Login (needed for NSFW tweets)
-o, --output   DIR           Output directory
-f, --file-format FORMAT     Formatted name for the downloaded file
-d, --date-format FORMAT     Apply custom date format. (https://go.dev/src/time/format.go)
-p, --proxy    PROXY         Use proxy (proto://ip:port)
-V, --version                Print version and exit
-B, --[no-]banner            Don't print banner

Examples:

Download 300 tweets from @Spraytrains.

If the tweet doesn't contain a photo or video nothing will be downloaded but it will count towards the 300.

twmd -u Spraytrains -o ~/Downloads -a -n 300

Due to rate limits of twitter, it is possible to fetch at most 500–600 tweets. To fetch as more tweets as possible, change the argument of -n to a bigger number, like 3000.

You can use -r|--retweet to download retweets as well, or -R|--retweet-only to download retweet only

-U|--update will only download missing media.

Download a single tweet:

twmd -t 156170319961391104

NSFW tweets

You'll need to login -L|--login for downloading nsfw tweets.

Using proxy

Both http and socks4/5 can be used:

twmd  --proxy socks5://127.0.0.1:9050 -t 156170319961391104

Installation:

Note: If you don't want to build it you can download prebuilt binaries here.

Cli:

git clone https://github.com/mmpx12/twitter-media-downloader.git
cd twitter-media-downloader
make
sudo make install
# OR
sudo make all
# Clean
sudo make clean

Gui:

git clone https://github.com/mmpx12/twitter-media-downloader.git
cd twitter-media-downloader
# linux
make linux-gui
# windows
make windows-gui

Termux (no root):

installation:

git clone https://github.com/mmpx12/twitter-media-downloader.git
cd twitter-media-downloader
make
make termux-install
# OR
make termux-all
# Clean
make termux-clean

You may also want to add stuff in ~/bin/termux-url-opener to automatically download profile or post when share with termux.

cd ~/storage/downlaods
if grep twitter <<< "$1" >/dev/null; then
  if [[ $(tr -cd '/' <<< "$1" | wc -c) -eq 3 ]]; then
    userid=$(cut -d '/' -f 4 <<< "$1" |  cut -d '?' -f 1)
    echo "$userid"
    twmd -B -u "$userid" -o twitter -i -v -n 3000
  else 
    postid=$(cut -d '/' -f 6 <<< "$1" |  cut -d '?' -f 1)
    twmd -B -t "$postid" -o twitter
  fi
fi

Check here for a full termux-url-opener example.

Gifs are not supported at the moment.

twitter-media-downloader's People

Contributors

abdourahmanegadio avatar cosmicdoggo avatar kazuprog avatar milliorn avatar missuo avatar mmpx12 avatar sonic853 avatar weakish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

twitter-media-downloader's Issues

Not launching ?

I downloaded the latest release (windows AMD v1.12) and when I launch it nothing happens.

I tried opening up command prompt and using the the command twmd as per the example bu it's not working. (it says command is not recognised).

I also tried changing the directory to the location where the executable is in but i get the same result.

Any idea why this might be?

I tried the GUI too but when I input my parameters and click "download" it processes for a while then stops without any apparent progress or any results.

wont launch

dont know how else to say it wont launch, quick command prompt then nothing.

Only downloaded 90 files

User has 1000+ image, but when i run the program, only 90 item downloaded

@melty_pot

Screenshot from 2022-08-19 02-25-09

Does this have to be logged in twitter account to get better results?

Thanks.

Not works

It does not work.

I downloaded the cli and tried to run it according to the commands in the repository usage section but it didn't work with any type of account, I tried to use the GUI and it didn't work either.

I ran it through virustotal and 3 antivirus report it as Trojan.

image

How to login

How do i login?

I try -L|--login followed by my username and pass, but nothing happens.
Help please.

Any request results in "response status 404 Not Found:"

How to reproduce:

Invoke the utility with any arguments.

Environment

Tested on Windows 11, same results in both GUI & CLI v1.11.4 utility executables.

Details

Calling the utility and specifying any tweet (both SFW & NSFW) results in 404.
The type of media therein doesn't matter.

Add quality

Can you add option for quality media download?

Multiple images and videos downloaded are 0KB or incomplete

I am writing to report a bug in the Twitter-media-downloader-v1.11.2-windows-amd64 software. When using the following command:

twmd -u -L -a -o ./media -U
multiple images and videos downloaded with this command are either 0KB in size or the data is not completely downloaded.

I appreciate your hard work in developing this software.
Thank you for your time and attention.

No download all tweet video

I am running the command to download retweets from an account, which are video only, with the -U option to only download the ones that are not downloaded and with the -L option to log in with my account and not download all the videos. A retweet from a few days ago is not downloaded, but others are.

In the result only appears "XXXX.mp4: already exists" I don't see any message other than that (apparently all downloaded).

Command:
twmd -u ACCOUNT -o /home/test/ -v -U -r -L

Download text tweets?

Why not get the text tweets? Simply save them to a file either one per tweet or collectively?

Despite user/pw being correct, I always get error

I am apparently unable to log in. When I enter this commend:

twmd -L -B -s small -t 1783130850533535870

I am prompted to enter user and password. No matter how many times I enter them correctly, I always get "Bad user/pass"

I just installed your latest build for Linux. Thoughts?

Can't type in password at all

Trying to login to download NSFW content is impossible, because the password input doesn't react to my keystrokes at all. The only key that responds is Enter, but that just gives me a "Bad user/pass" message because the latter's empty. I'd be more understanding if a correct password didn't work, but being completely unable to type?

I'm using Windows 10, and tried vanilla Command Prompt and PowerShell; if I had to use something more specific, it wasn't really made clear enough and could be corrected. I'd appreciate any help you could give.

add a proxy option?

-p, --proxy Download through a proxy
like socks5://127.0.0.1:7890 or http://127.0.0.1:7890

Can't make it

Screenshot 2023-02-04_13-01-28_8

When I try to build TWMD, it throws this error:

>$ make
go build -ldflags="-w -s"
# twmd
./twmd.go:30:2: version redeclared in this block
	./gui.go:16:7: other declaration of version
./twmd.go:210:6: main redeclared in this block
	./gui.go:454:6: other declaration of main
make: *** [Makefile:2: build] Error 1

I use golang 1.20.
Prebuilt version works fine but afaik there is no GUI version, is there?

Also, is it possible to add a date interval option?

Repeatedly downloading same videos for several times

Hi,

I am using [v1.11.2-linux-amd64.tar.gz] release on Ubuntu 22.04.2 LTS on WSL1 , trying to download all videos from a user by:

./twmd -u hikaru_emo -o ./twitter-download/ -v

but it repeatedly downloads 3 videos (start with oxc, llK & j7s):

/mnt/g ❯ ./twmd -u hikaru_emo -o ./twitter-download/ -v
▄▄▄▄▄▄▄▌ ▐ ▄▌• ▌ ▄ ·. ·▄▄▄▄
•██  ██· █▌▐█·██ ▐███▪██▪ ██
 ▐█.▪██▪▐█▐▐▌▐█ ▌▐▌▐█·▐█· ▐█▌
 ▐█▌·▐█▌██▐█▌██ ██▌▐█▌██. ██
 ▀▀▀  ▀▀▀▀ ▀▪▀▀  █▪▀▀▀▀▀▀▀▀•

Downloaded oxc2jd4WFKvuN5U8.mp4
Downloaded j7s_7NmBSiFF-TI1.mp4
Downloaded oxc2jd4WFKvuN5U8.mp4
Downloaded llKJbQlmJW-IOlUa.mp4
Downloaded j7s_7NmBSiFF-TI1.mp4
Downloaded oxc2jd4WFKvuN5U8.mp4
Downloaded llKJbQlmJW-IOlUa.mp4
Downloaded j7s_7NmBSiFF-TI1.mp4
Downloaded oxc2jd4WFKvuN5U8.mp4
Downloaded llKJbQlmJW-IOlUa.mp4
Downloaded j7s_7NmBSiFF-TI1.mp4

(Repeat for over 10 times)

There are some NSFW videos from this user. After using -L to log in, the repeating bug vanished, but issue #25 came up and continued to show up after several retries, btw.
Seem like a trivial bug. Hope this will help for fixing it.

Best Regards

It's not working now

A few days ago, the twitter-media-downloader chrome extension was working fine, but it's not working now. Download buttons are not coming. Before it was showing  Likes, media, and download image button, but recently it's showing nothing. Do I need to change anything?

Login

Hey,
nice tool but is there a way to put the credentials in the command line or something ?
the prompt is quite bothering :/

Also a way to add the replies would be sweet

Can't login into account

When entering -L|--login I get asked about username and password. I can type the username into terminal, but I can't type the password for some reason. I'm using windows-amd64 1.13.1 version

Windows AMD64 version 1.0.5 doesn't run

Apologies for the terrible title but I have no idea how specific I can be.

I downloaded the [twitter-media-downloader-v1.0.5-windows-amd64.zip] from the repository. Extracted the .exe file and double clicked on it but nothing happens.

My processor is an AMD R5 5600H so this is the correct version, I think.

Do I require any pre-requisites or is there an installation method?

Odd behaviour with a twitter profile

So I was testing the GUI out with twitter.com/Crunchyroll and it appears to re-download the first 121 images/videos over and over until the set download limit is hit. It just over-writes those 121 files over and over. Doesn't care if a file with the same name already exists.

Download does not run and there are no errors

twmd -u 5percent_Dora -o C:\ -v -n 1

When I run the above with CMD, an empty folder called C:\5percent_Dora/video is simply created in the specified directory, and no download is performed.
No error messages are displayed either.

It just shows ASCII art.

I tried changing the output destination directory, changing the specified account, and reinstalling, but the problem was not resolved.

Installation was performed using the following steps. (This is a Japanese web page. Please use Google Translate if you need to refer to it.)
https://gigazine.net/news/20231023-twitter-media-downloader/

rate limit?

response status 429 Too Many Requests: {"code":88,"message":"Rate limit exceeded."}

I can not log in

I try to log in using the [-L ], I can enter the username but not the password...
OS is windows 11and I tried twms 1.11.0~1.11.2

not downloading all media

In some accounts, sometimes only half of the total media is downloaded, even though the -U flag is used.

Is it possible to use a file to input a list of user names?

can't download anything

Scrap: response status 404 Not Found:
Possibly because twitter has come to forcibly redirect to x.com?

Freezing on login

I've attempted to login to download images from a locked account (does it work like that?) and cmd doesn't accept input after typing my username, it's stuck on the password.

Unable to compile successfully

Unfortunately, I couldn't compile it successfully under macOS.

go build -ldflags="-w -s"
# github.com/sqweek/dialog/cocoa
dlg.m:96:10: warning: 'setAllowedFileTypes:' is deprecated: first deprecated in macOS 12.0 - Use -allowedContentTypes instead [-Wdeprecated-declarations]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:215:49: note: property 'allowedFileTypes' is declared deprecated here
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:215:49: note: 'setAllowedFileTypes:' has been explicitly marked deprecated here
# twmd
./twmd.go:30:2: version redeclared in this block
	./gui.go:16:7: other declaration of version
./twmd.go:210:6: main redeclared in this block
	./gui.go:454:6: other declaration of main
make: *** [build] Error 2

Download ends midway.

For example, if there are 100 images or videos, it will stop at 50. Is there a way to avoid this?

can't login

I can enter username but cannot enter password.

IF I don't use "-L", I could download all the images except the NSFW tweet without any problem, so it seems that the command is not wrong.

Quantify tweet limit mentioned in readme

The readme mentions that you will not be able to download more than 3200 tweets.

Is this a total limit and you'll be cut off by twitter after that many tweets somehow, or is it a limit for the User Downloads/bulk tweets features, where it can't get more than 3200 tweets~ at a time?

What does this limit mean for attempting to archive, for example, accounts with 4,000+ tweets?

Downloading up until a certian date

As stated in the title, is there any way to download up until a certain date, or any date between parameters? I've used the cli in the past, and want to update what I have archived and downloaded, without running the risk and hassle of dealing with duplicate posts and files.

Is there any way to do this that I am not seeing? If not, is it a possibility to be added?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.