mirror of
https://github.com/Alvin-Zilverstand/Twitter-X-Media-Batch-Downloader.git
synced 2026-11-24 15:23:11 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7fa277931c | ||
|
|
be080481bf | ||
|
|
8a720e3e2b | ||
|
|
48a672e0bd | ||
|
|
91210f1c82 | ||
|
|
cb2a244e37 | ||
|
|
096425a0e1 | ||
|
|
c01a995b3d | ||
|
|
b28b4ef14c | ||
|
|
1e14fa6934 | ||
|
|
eac8a0f168 | ||
|
|
f3904c276c | ||
|
|
fe9724fa2f | ||
|
|
85e8f3135a | ||
|
|
1e2725f900 | ||
|
|
8e114a45e0 | ||
|
|
92267dbf5e | ||
|
|
37da356f4c | ||
|
|
eb268f5f9f | ||
|
|
e8ac4b8734 | ||
|
|
99afe59a11 | ||
|
|
8e8c0667df | ||
|
|
03479326b3 | ||
|
|
b39f40e9f9 | ||
|
|
5ed127f226 | ||
|
|
3487edf691 | ||
|
|
5b336df1d4 |
No files matched your search
@@ -4,7 +4,7 @@ import os
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from gallery_dl.extractor import twitter
|
from gallery_dl.extractor import twitter
|
||||||
|
|
||||||
def get_metadata(username):
|
def get_metadata(username, auth_token):
|
||||||
url = f"https://x.com/{username}/timeline"
|
url = f"https://x.com/{username}/timeline"
|
||||||
|
|
||||||
match = re.match(twitter.TwitterTimelineExtractor.pattern, url)
|
match = re.match(twitter.TwitterTimelineExtractor.pattern, url)
|
||||||
@@ -15,7 +15,7 @@ def get_metadata(username):
|
|||||||
|
|
||||||
extractor.config = lambda key, default=None: {
|
extractor.config = lambda key, default=None: {
|
||||||
"cookies": {
|
"cookies": {
|
||||||
"auth_token": ""
|
"auth_token": auth_token
|
||||||
}
|
}
|
||||||
}.get(key, default)
|
}.get(key, default)
|
||||||
|
|
||||||
@@ -75,4 +75,5 @@ def get_metadata(username):
|
|||||||
return output
|
return output
|
||||||
|
|
||||||
username = ""
|
username = ""
|
||||||
get_metadata(username)
|
auth_token = ""
|
||||||
|
get_metadata(username, auth_token)
|
||||||
+4
-3
@@ -3,7 +3,7 @@ import re
|
|||||||
import os
|
import os
|
||||||
from gallery_dl.extractor import twitter
|
from gallery_dl.extractor import twitter
|
||||||
|
|
||||||
def get_metadata(username):
|
def get_metadata(username, auth_token):
|
||||||
url = f"https://x.com/{username}/timeline"
|
url = f"https://x.com/{username}/timeline"
|
||||||
|
|
||||||
match = re.match(twitter.TwitterTimelineExtractor.pattern, url)
|
match = re.match(twitter.TwitterTimelineExtractor.pattern, url)
|
||||||
@@ -14,7 +14,7 @@ def get_metadata(username):
|
|||||||
|
|
||||||
extractor.config = lambda key, default=None: {
|
extractor.config = lambda key, default=None: {
|
||||||
"cookies": {
|
"cookies": {
|
||||||
"auth_token": ""
|
"auth_token": auth_token
|
||||||
}
|
}
|
||||||
}.get(key, default)
|
}.get(key, default)
|
||||||
|
|
||||||
@@ -31,4 +31,5 @@ def get_metadata(username):
|
|||||||
json.dump(all_items, f, indent=2, default=str)
|
json.dump(all_items, f, indent=2, default=str)
|
||||||
|
|
||||||
username = ""
|
username = ""
|
||||||
get_metadata(username)
|
auth_token = ""
|
||||||
|
get_metadata(username, auth_token)
|
||||||
@@ -3,38 +3,56 @@
|
|||||||

|

|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<b>Twitter/X Media Batch Downloader</b> is a GUI tool that allows users to download all media, including images and videos, in their original quality from Twitter/X accounts using <code>gallery-dl</code>
|
<b>Twitter/X Media Batch Downloader</b> is a GUI tool that allows users to download all media, including images and videos, in their original quality from Twitter/X accounts, even withheld account, using <code>gallery-dl</code>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## Download
|
## Download
|
||||||
|
|
||||||
- Download the latest version of [TwitterXMediaBatchDownloader](https://github.com/afkarxyz/Twitter-X-Media-Batch-Downloader/releases/download/v1.2/TwitterXMediaBatchDownloader.exe)
|
- Download the latest version of [TwitterXMediaBatchDownloader](https://github.com/afkarxyz/Twitter-X-Media-Batch-Downloader/releases/download/v1.8/TwitterXMediaBatchDownloader.exe)
|
||||||
- If you're familiar with **userscripts**, please install it [here](https://greasyfork.org/en/scripts/523157-twitter-x-media-batch-downloader)
|
- If you're familiar with **userscripts**, please install it [here](https://greasyfork.org/en/scripts/523157-twitter-x-media-batch-downloader)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Uses the powerful `gallery-dl` library, similar to `yt-dlp`
|
- Uses the powerful `gallery-dl` library, similar to `yt-dlp`
|
||||||
- Simple and compact GUI
|
- The ability to download media from **Withheld Account**
|
||||||
|
- Option to choose the media type to download: **All Media** (Image + GIF + Video) or just **Image/GIF/Video**
|
||||||
- Download images and videos in original quality
|
- Download images and videos in original quality
|
||||||
- Option to choose the media type to download: **media** (image + video) or just **image/video**
|
|
||||||
- **Batch** download settings, ranging from 10 to 100 files per download
|
|
||||||
- Filename format customization
|
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
> Downloading from **Withheld Account**
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## How to Obtain Auth Token
|
## How to Obtain Auth Token
|
||||||
|
|
||||||
|
> [!Warning]
|
||||||
|
> - I suggest not using the **main account** to obtain the token.
|
||||||
|
> - You can use https://temp-mail.io to register a Twitter account.
|
||||||
|
> - Using an auth token or cookies has the potential to get the **account suspended.**
|
||||||
|
> - If too many media files are fetched, it will trigger a **rate limit**, and the media retrieval will fail.
|
||||||
|
|
||||||
1. Go to [Twitter's website](https://www.x.com/)
|
1. Go to [Twitter's website](https://www.x.com/)
|
||||||
2. Log into your account
|
2. Log into your account
|
||||||
3. Open the Developer Tools by pressing `F12`
|
3. Open the Developer Tools by pressing `F12`
|
||||||
4. Navigate to the **Application** tab, then select **Storage** > **Cookies**
|
4. Navigate to the **Application** tab, then select **Storage** > **Cookies**
|
||||||
5. Find and copy the `auth_token` value or use the browser extension [Cookie-Editor](https://cookie-editor.com/)
|
5. Find and copy the `auth_token` value or use the browser extension [X.com Auth Token Grabber](https://github.com/afkarxyz/Twitter-X-Media-Batch-Downloader/releases/download/v1.0/X.com.Auth.Token.Grabber.zip)
|
||||||
6. Do not log out of your account, as a new `auth_token` will be generated by Twitter
|
6. Do not log out of your account, as a new `auth_token` will be generated by Twitter
|
||||||
|
|
||||||

|
> X.com Auth Token Grabber
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
> Developer Tools
|
||||||
|
|
||||||
|

|
||||||
+660
-221
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"version": "1.7"
|
||||||
|
}
|
||||||
Reference in new issue
Block a user