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 | |
|---|---|---|---|
|
|
5613c152f8 | ||
|
|
ad5d7727eb | ||
|
|
ed1f0fce06 | ||
|
|
ee92174773 | ||
|
|
f08ce57feb | ||
|
|
4f21321e42 | ||
|
|
c8b7a5365a |
No files matched your search
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
## 📥 Download
|
## 📥 Download
|
||||||
|
|
||||||
- Download the latest version of [TwitterXMediaBatchDownloader](https://github.com/afkarxyz/Twitter-X-Media-Batch-Downloader/releases/download/v2.3/TwitterXMediaBatchDownloader.exe)
|
- Download the latest version of [TwitterXMediaBatchDownloader](https://github.com/afkarxyz/Twitter-X-Media-Batch-Downloader/releases/download/v2.5/TwitterXMediaBatchDownloader.exe)
|
||||||
- If you're familiar with **userscripts**, please install it [here](https://greasyfork.org/en/scripts/523157)
|
- If you're familiar with **userscripts**, please install it [here](https://greasyfork.org/en/scripts/523157)
|
||||||
|
|
||||||
## ✨ Features
|
## ✨ Features
|
||||||
@@ -19,11 +19,13 @@
|
|||||||
|
|
||||||
## 🖼️ Screenshots
|
## 🖼️ Screenshots
|
||||||
|
|
||||||

|

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

|

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

|

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

|
||||||
|
|
||||||
> [!Important]
|
> [!Important]
|
||||||
> Use **Batch** if the items to be downloaded are in the thousands.
|
> Use **Batch** if the items to be downloaded are in the thousands.
|
||||||
@@ -34,7 +36,7 @@
|
|||||||
> - I suggest not using the **main account** to obtain the token.
|
> - I suggest not using the **main account** to obtain the token.
|
||||||
> - You can use https://temp-mail.io to register a Twitter account.
|
> - 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.**
|
> - Using an auth token or cookies has the potential to get the **account suspended.**
|
||||||
> - If too many media files are fetched, it may trigger a **rate limit**, and the media retrieval will fail.
|
> - If too many media files are fetched, it may trigger a **rate limit**, and the media retrieval will fail, try enabling Batch mode.
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ class UpdateDialog(QDialog):
|
|||||||
class TwitterMediaDownloaderGUI(QMainWindow):
|
class TwitterMediaDownloaderGUI(QMainWindow):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.current_version = "2.4"
|
self.current_version = "2.5"
|
||||||
self.setWindowTitle("Twitter/X Media Batch Downloader")
|
self.setWindowTitle("Twitter/X Media Batch Downloader")
|
||||||
|
|
||||||
self.settings = QSettings('TwitterMediaDownloader', 'Settings')
|
self.settings = QSettings('TwitterMediaDownloader', 'Settings')
|
||||||
@@ -341,8 +341,7 @@ class TwitterMediaDownloaderGUI(QMainWindow):
|
|||||||
self.tab_widget.addTab(self.main_tab, "Main")
|
self.tab_widget.addTab(self.main_tab, "Main")
|
||||||
self.tab_widget.addTab(self.settings_tab, "Settings")
|
self.tab_widget.addTab(self.settings_tab, "Settings")
|
||||||
|
|
||||||
self.main_layout.addWidget(self.tab_widget)
|
self.main_layout.addWidget(self.tab_widget)
|
||||||
|
|
||||||
self.input_widget = QWidget()
|
self.input_widget = QWidget()
|
||||||
input_layout = QVBoxLayout(self.input_widget)
|
input_layout = QVBoxLayout(self.input_widget)
|
||||||
input_layout.setSpacing(10)
|
input_layout.setSpacing(10)
|
||||||
@@ -407,8 +406,8 @@ class TwitterMediaDownloaderGUI(QMainWindow):
|
|||||||
self.batch_checkbox.stateChanged.connect(self.handle_batch_checkbox)
|
self.batch_checkbox.stateChanged.connect(self.handle_batch_checkbox)
|
||||||
first_row_layout.addWidget(self.batch_checkbox)
|
first_row_layout.addWidget(self.batch_checkbox)
|
||||||
|
|
||||||
size_label = QLabel("Size:")
|
self.size_label = QLabel("Size:")
|
||||||
first_row_layout.addWidget(size_label)
|
first_row_layout.addWidget(self.size_label)
|
||||||
|
|
||||||
self.batch_size_combo = QComboBox()
|
self.batch_size_combo = QComboBox()
|
||||||
self.batch_size_combo.setCursor(QCursor(Qt.CursorShape.PointingHandCursor))
|
self.batch_size_combo.setCursor(QCursor(Qt.CursorShape.PointingHandCursor))
|
||||||
@@ -418,6 +417,9 @@ class TwitterMediaDownloaderGUI(QMainWindow):
|
|||||||
self.batch_size_combo.setCurrentIndex(1)
|
self.batch_size_combo.setCurrentIndex(1)
|
||||||
first_row_layout.addWidget(self.batch_size_combo)
|
first_row_layout.addWidget(self.batch_size_combo)
|
||||||
|
|
||||||
|
self.size_label.hide()
|
||||||
|
self.batch_size_combo.hide()
|
||||||
|
|
||||||
first_row_layout.addSpacing(5)
|
first_row_layout.addSpacing(5)
|
||||||
|
|
||||||
timeline_label = QLabel("Timeline Type:")
|
timeline_label = QLabel("Timeline Type:")
|
||||||
@@ -459,7 +461,7 @@ class TwitterMediaDownloaderGUI(QMainWindow):
|
|||||||
self.settings_tab_layout.addWidget(download_settings_label)
|
self.settings_tab_layout.addWidget(download_settings_label)
|
||||||
|
|
||||||
batch_download_item_layout = QHBoxLayout()
|
batch_download_item_layout = QHBoxLayout()
|
||||||
batch_download_label = QLabel("Batch Download Items:")
|
batch_download_label = QLabel("Batch Size:")
|
||||||
self.download_batch_combo = QComboBox()
|
self.download_batch_combo = QComboBox()
|
||||||
self.download_batch_combo.setCursor(QCursor(Qt.CursorShape.PointingHandCursor))
|
self.download_batch_combo.setCursor(QCursor(Qt.CursorShape.PointingHandCursor))
|
||||||
self.download_batch_combo.setFixedWidth(80)
|
self.download_batch_combo.setFixedWidth(80)
|
||||||
@@ -475,8 +477,8 @@ class TwitterMediaDownloaderGUI(QMainWindow):
|
|||||||
|
|
||||||
filename_layout = QHBoxLayout()
|
filename_layout = QHBoxLayout()
|
||||||
filename_label = QLabel("Filename Format:")
|
filename_label = QLabel("Filename Format:")
|
||||||
self.format_username = QRadioButton("Username - Post Date")
|
self.format_username = QRadioButton("Username - Date")
|
||||||
self.format_date = QRadioButton("Post Date - Username")
|
self.format_date = QRadioButton("Date - Username")
|
||||||
self.format_username.setCursor(QCursor(Qt.CursorShape.PointingHandCursor))
|
self.format_username.setCursor(QCursor(Qt.CursorShape.PointingHandCursor))
|
||||||
self.format_date.setCursor(QCursor(Qt.CursorShape.PointingHandCursor))
|
self.format_date.setCursor(QCursor(Qt.CursorShape.PointingHandCursor))
|
||||||
filename_layout.addWidget(filename_label)
|
filename_layout.addWidget(filename_label)
|
||||||
@@ -596,7 +598,7 @@ class TwitterMediaDownloaderGUI(QMainWindow):
|
|||||||
status_layout.setContentsMargins(0, 0, 0, 0)
|
status_layout.setContentsMargins(0, 0, 0, 0)
|
||||||
status_layout.setSpacing(5)
|
status_layout.setSpacing(5)
|
||||||
|
|
||||||
self.version_label = QLabel("v2.4 (gallery-dl v1.29.6)")
|
self.version_label = QLabel("v2.6 (gallery-dl v1.29.7)")
|
||||||
status_layout.addWidget(self.version_label)
|
status_layout.addWidget(self.version_label)
|
||||||
|
|
||||||
self.status_label = QLabel("")
|
self.status_label = QLabel("")
|
||||||
@@ -650,7 +652,7 @@ class TwitterMediaDownloaderGUI(QMainWindow):
|
|||||||
self.set_status_text("No profile information available")
|
self.set_status_text("No profile information available")
|
||||||
self.stop_auto_batch()
|
self.stop_auto_batch()
|
||||||
return
|
return
|
||||||
|
|
||||||
username = self.url_input.text().strip()
|
username = self.url_input.text().strip()
|
||||||
auth_token = self.auth_input.text().strip()
|
auth_token = self.auth_input.text().strip()
|
||||||
|
|
||||||
@@ -707,9 +709,8 @@ class TwitterMediaDownloaderGUI(QMainWindow):
|
|||||||
self.next_batch_button.hide()
|
self.next_batch_button.hide()
|
||||||
self.set_status_text(f"Auto batch complete! All {media_count:,} media items fetched. No more items available.")
|
self.set_status_text(f"Auto batch complete! All {media_count:,} media items fetched. No more items available.")
|
||||||
return
|
return
|
||||||
|
|
||||||
QTimer.singleShot(500, self.fetch_next_batch_auto)
|
QTimer.singleShot(500, self.fetch_next_batch_auto)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.set_status_text(f"Error processing auto batch: {str(e)}")
|
self.set_status_text(f"Error processing auto batch: {str(e)}")
|
||||||
self.stop_auto_batch()
|
self.stop_auto_batch()
|
||||||
@@ -719,8 +720,15 @@ class TwitterMediaDownloaderGUI(QMainWindow):
|
|||||||
self.stop_auto_batch()
|
self.stop_auto_batch()
|
||||||
|
|
||||||
def handle_batch_checkbox(self, state):
|
def handle_batch_checkbox(self, state):
|
||||||
|
if self.batch_checkbox.isChecked():
|
||||||
|
self.size_label.show()
|
||||||
|
self.batch_size_combo.show()
|
||||||
|
else:
|
||||||
|
self.size_label.hide()
|
||||||
|
self.batch_size_combo.hide()
|
||||||
|
|
||||||
if hasattr(self, 'media_info') and self.media_info:
|
if hasattr(self, 'media_info') and self.media_info:
|
||||||
if state == Qt.CheckState.Checked and self.media_info.get('metadata', {}).get('has_more', False):
|
if self.batch_checkbox.isChecked() and self.media_info.get('metadata', {}).get('has_more', False):
|
||||||
self.next_batch_button.show()
|
self.next_batch_button.show()
|
||||||
self.auto_batch_button.show()
|
self.auto_batch_button.show()
|
||||||
else:
|
else:
|
||||||
@@ -789,11 +797,23 @@ class TwitterMediaDownloaderGUI(QMainWindow):
|
|||||||
self.batch_checkbox.setChecked(batch_mode)
|
self.batch_checkbox.setChecked(batch_mode)
|
||||||
self.batch_checkbox.blockSignals(False)
|
self.batch_checkbox.blockSignals(False)
|
||||||
|
|
||||||
|
# Set visibility of batch size elements based on saved batch mode
|
||||||
|
if batch_mode:
|
||||||
|
self.size_label.show()
|
||||||
|
self.batch_size_combo.show()
|
||||||
|
self.download_size_label.show()
|
||||||
|
self.download_batch_combo.show()
|
||||||
|
else:
|
||||||
|
self.size_label.hide()
|
||||||
|
self.batch_size_combo.hide()
|
||||||
|
self.download_size_label.hide()
|
||||||
|
self.download_batch_combo.hide()
|
||||||
|
|
||||||
fetch_batch_size = str(self.settings.value('fetch_batch_size', '100'))
|
fetch_batch_size = str(self.settings.value('fetch_batch_size', '100'))
|
||||||
index = self.batch_size_combo.findText(fetch_batch_size)
|
index = self.batch_size_combo.findText(fetch_batch_size)
|
||||||
if index >= 0:
|
if index >= 0:
|
||||||
self.batch_size_combo.setCurrentIndex(index)
|
self.batch_size_combo.setCurrentIndex(index)
|
||||||
|
|
||||||
download_batch_size = str(self.settings.value('download_batch_size', '25'))
|
download_batch_size = str(self.settings.value('download_batch_size', '25'))
|
||||||
index = self.download_batch_combo.findText(download_batch_size)
|
index = self.download_batch_combo.findText(download_batch_size)
|
||||||
if index >= 0:
|
if index >= 0:
|
||||||
@@ -824,7 +844,6 @@ class TwitterMediaDownloaderGUI(QMainWindow):
|
|||||||
subprocess.run(['xdg-open', output_dir])
|
subprocess.run(['xdg-open', output_dir])
|
||||||
|
|
||||||
def set_status_text(self, text):
|
def set_status_text(self, text):
|
||||||
"""Set status text and hide/show version label accordingly"""
|
|
||||||
self.status_label.setText(text)
|
self.status_label.setText(text)
|
||||||
if text:
|
if text:
|
||||||
self.version_label.hide()
|
self.version_label.hide()
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"version": "2.3"
|
"version": "2.5"
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user