mirror of
https://github.com/Alvin-Zilverstand/Twitter-X-Media-Batch-Downloader.git
synced 2026-11-24 07:13: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 |
No files matched your search
@@ -4,7 +4,7 @@ import os
|
||||
from datetime import datetime
|
||||
from gallery_dl.extractor import twitter
|
||||
|
||||
def get_metadata(username):
|
||||
def get_metadata(username, auth_token):
|
||||
url = f"https://x.com/{username}/timeline"
|
||||
|
||||
match = re.match(twitter.TwitterTimelineExtractor.pattern, url)
|
||||
@@ -15,7 +15,7 @@ def get_metadata(username):
|
||||
|
||||
extractor.config = lambda key, default=None: {
|
||||
"cookies": {
|
||||
"auth_token": ""
|
||||
"auth_token": auth_token
|
||||
}
|
||||
}.get(key, default)
|
||||
|
||||
@@ -75,4 +75,5 @@ def get_metadata(username):
|
||||
return output
|
||||
|
||||
username = ""
|
||||
get_metadata(username)
|
||||
auth_token = ""
|
||||
get_metadata(username, auth_token)
|
||||
+4
-3
@@ -3,7 +3,7 @@ import re
|
||||
import os
|
||||
from gallery_dl.extractor import twitter
|
||||
|
||||
def get_metadata(username):
|
||||
def get_metadata(username, auth_token):
|
||||
url = f"https://x.com/{username}/timeline"
|
||||
|
||||
match = re.match(twitter.TwitterTimelineExtractor.pattern, url)
|
||||
@@ -14,7 +14,7 @@ def get_metadata(username):
|
||||
|
||||
extractor.config = lambda key, default=None: {
|
||||
"cookies": {
|
||||
"auth_token": ""
|
||||
"auth_token": auth_token
|
||||
}
|
||||
}.get(key, default)
|
||||
|
||||
@@ -31,4 +31,5 @@ def get_metadata(username):
|
||||
json.dump(all_items, f, indent=2, default=str)
|
||||
|
||||
username = ""
|
||||
get_metadata(username)
|
||||
auth_token = ""
|
||||
get_metadata(username, auth_token)
|
||||
@@ -3,39 +3,36 @@
|
||||

|
||||
|
||||
<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, even withheld 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>
|
||||
|
||||
## Download
|
||||
|
||||
- Download the latest version of [TwitterXMediaBatchDownloader](https://github.com/afkarxyz/Twitter-X-Media-Batch-Downloader/releases/download/v1.3/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)
|
||||
|
||||
## Features
|
||||
|
||||
- Uses the powerful `gallery-dl` library, similar to `yt-dlp`
|
||||
- The ability to download media from **Withheld Accounts**
|
||||
- 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
|
||||
- Option to choose the media type to download: **media** (image + GIF + video) or just **image/GIF/video**
|
||||
- **Batch** download settings, ranging from 10 to 100 files per download
|
||||
- Filename format customization
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

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

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
## How to Obtain Auth Token
|
||||
|
||||
@@ -43,12 +40,19 @@
|
||||
> - 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/)
|
||||
2. Log into your account
|
||||
3. Open the Developer Tools by pressing `F12`
|
||||
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
|
||||
|
||||

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

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

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