mirror of
https://github.com/Alvin-Zilverstand/Twitter-X-Media-Batch-Downloader.git
synced 2026-12-02 11:01:25 +01:00
Update v1.7
This commit is contained in:
1 parent
cb2a244e37
commit
91210f1c82
4 files changed
+12
-10
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)
|
||||
Reference in new issue
Block a user