mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-27 22:11:11 +00:00
Correction of URL building
This commit is contained in:
parent
6404296631
commit
97f6187e40
5
twoot.py
5
twoot.py
|
@ -30,7 +30,7 @@ import sqlite3
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from urllib.parse import urlparse, parse_qsl, urlencode, urlunparse
|
from urllib.parse import urlparse, parse_qsl, urlencode, urlunparse, urljoin
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from bs4 import BeautifulSoup, element
|
from bs4 import BeautifulSoup, element
|
||||||
|
@ -424,7 +424,8 @@ def process_attachments(nitter_url, attachments_container, status_id, author_acc
|
||||||
if TOML['options']['upload_videos']:
|
if TOML['options']['upload_videos']:
|
||||||
import youtube_dl
|
import youtube_dl
|
||||||
|
|
||||||
video_file = os.path.join('https://twitter.com', author_account, 'status', status_id)
|
video_path = f"{author_account}/status/{status_id}"
|
||||||
|
video_file = urljoin('https://twitter.com', video_path)
|
||||||
ydl_opts = {
|
ydl_opts = {
|
||||||
'outtmpl': "output/" + TOML['config']['twitter_account'] + "/" + status_id + "/%(id)s.%(ext)s",
|
'outtmpl': "output/" + TOML['config']['twitter_account'] + "/" + status_id + "/%(id)s.%(ext)s",
|
||||||
'format': "best[width<=500]",
|
'format': "best[width<=500]",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user