summaryrefslogtreecommitdiff
path: root/src/portal/py
diff options
context:
space:
mode:
Diffstat (limited to 'src/portal/py')
-rw-r--r--src/portal/py/modules/__init__.py8
-rw-r--r--src/portal/py/modules/youtube.py5
-rw-r--r--src/portal/py/tests/archive_query.py26
3 files changed, 29 insertions, 10 deletions
diff --git a/src/portal/py/modules/__init__.py b/src/portal/py/modules/__init__.py
index c44e571..cc34b82 100644
--- a/src/portal/py/modules/__init__.py
+++ b/src/portal/py/modules/__init__.py
@@ -14,11 +14,11 @@ ALL_MODULES = {
# config.TWITTER_ACCESS_TOKEN, config.TWITTER_ACCESS_TOKEN_SECRET,
# config.TWITTER_CONSUMER_TOKEN, config.TWITTER_CONSUMER_TOKEN_SECRET), []),
# 'twitter': (TwitterScrapeModule(config.TWITTER_COOKIES_PATH), []),
- 'pixiv_web': (PixivWebModule(config.PIXIV_SESSID, config.PIXIV_USERID), []),
+# 'pixiv_web': (PixivWebModule(config.PIXIV_SESSID, config.PIXIV_USERID), []),
# 'pixiv_app': (PixivAppModule(config.PIXIV_REFRESH_TOKEN), []),
'fanbox': (FanboxModule(config.FANBOX_SESSID, config.FANBOX_CF_CLEARANCE), []),
- 'instagram': (InstagramModule(
- config.INSTAGRAM_USER_AGENT, config.INSTAGRAM_SETTINGS_PATH,
- config.INSTAGRAM_SESSION_ID), []),
+# 'instagram': (InstagramModule(
+# config.INSTAGRAM_USER_AGENT, config.INSTAGRAM_SETTINGS_PATH,
+# config.INSTAGRAM_SESSION_ID), []),
# 'patreon': (PatreonModule(config.PATREON_SESSION_ID, config.PATREON_UUID, config.PATREON_USER_ID), [])
}
diff --git a/src/portal/py/modules/youtube.py b/src/portal/py/modules/youtube.py
index 5125f85..582a16c 100644
--- a/src/portal/py/modules/youtube.py
+++ b/src/portal/py/modules/youtube.py
@@ -26,7 +26,8 @@ ydl_opts = {
'quiet': False,
'logger': YDLLogger(),
'cachedir': False,
- 'socket_timeout': 10
+ 'socket_timeout': 10,
+ 'extractor_args': {'youtube': {'skip': ['hls'], 'player_client': ['android_vr']}}
# 'cookiefile': ''
}
@@ -94,7 +95,7 @@ class YoutubeBase(Search):
if info.get('direct'):
url = info['url']
else:
- url = get_playback_url(info, video=True)
+ url = get_playback_url(info, video=False)
if not url:
return False
unique_id = f'youtube:v:{info['id']}'
diff --git a/src/portal/py/tests/archive_query.py b/src/portal/py/tests/archive_query.py
index cff5e5d..1ed9db4 100644
--- a/src/portal/py/tests/archive_query.py
+++ b/src/portal/py/tests/archive_query.py
@@ -9,10 +9,12 @@ sys.path.append('../')
from base import Method
from post import PostEncoder, PostType, DateType, User
from modules import ALL_MODULES
-from logger import Logger
+from tests.logger import Logger
+#mode = 'pixiv_web'
mode = 'fanbox'
cmd = 'user'
+#cmd = 'bookmarks'
module = ALL_MODULES[mode][0]
if not module.init():
sys.exit(1)
@@ -170,8 +172,8 @@ class QueryDownloadThread(threading.Thread):
#RUNTIME_PATH = "./run"
RUNTIME_PATH = "/mnt/store/files/tmp/run"
-LOG_FILE = f'{RUNTIME_PATH}/archive3.log'
-ARG_FILE = f'{RUNTIME_PATH}/completed_args3.log'
+LOG_FILE = f'{RUNTIME_PATH}/archive4.log'
+ARG_FILE = f'{RUNTIME_PATH}/completed_args4.log'
def read_completed_args(path):
args = []
@@ -204,7 +206,23 @@ def download_args():
os.mkdir(output_dir)
#args = module.search(f'following:{22781328}')
- args = ['anoh223']
+ #args = ['22781328']
+ #args = ['anoh223']
+ #args = ['532891', '1324074',]
+ #args = ['6600030', '163436']
+ #args = ['85117546', '29506', '3298353', '21674944', '2034628', '3085731']
+ #args = ['6827013', '11742', '4671', '36323560', '5128785', '30970895']
+ #args = ['mugi49']
+ #args = ['71598064', '9204502', '689283', '19956185', '42987864', '103682732', '4675776', '7780', '160755', '250142', '3444594', '1995476', '357647']
+ #args = ['10473280']
+ #args = ['178217', '106414', '882896', '3040749']
+ #args = ['21245269']
+ #args = ['1969907', '292644', '746841']
+ #args = ['1319954', '43718238', '2721319', '53459337']
+ # TODO:
+ args = ['yzr']
+ #args = ['11187954']
+ # twitter test: butcha_u, sep__rina
threads = []
start = True