fix: use correct API endpoint for recommendation feed (module/feed)
This commit is contained in:
parent
4c33f40289
commit
3cca2e915f
@ -27,6 +27,7 @@ DEFAULT_USER_URL = (
|
||||
)
|
||||
DEFAULT_BROWSER_PORT = 9223
|
||||
LISTEN_TARGET = "web/aweme/post/"
|
||||
RECOMMENDATION_LISTEN_TARGET = "web/module/feed/"
|
||||
SINGLE_VIDEO_LISTEN_TARGET = "web/aweme/detail/"
|
||||
INVALID_FILENAME_CHARS = re.compile(r'[\\/:*?"<>|\r\n\t]')
|
||||
RECOMMENDATION_URL_PATTERN = re.compile(r"^https?://www\.douyin\.com/?(?:\?.*)?$")
|
||||
@ -398,7 +399,7 @@ def collect_recommendations(
|
||||
if browser_port is not None:
|
||||
ensure_browser_debug_port_ready(browser_port)
|
||||
page = create_page(chromium_page_cls, chromium_options_cls, browser_port)
|
||||
page.listen.start(LISTEN_TARGET)
|
||||
page.listen.start(RECOMMENDATION_LISTEN_TARGET)
|
||||
|
||||
print("[INFO] 正在打开抖音推荐流。若出现登录或验证码,请先在浏览器窗口里完成。")
|
||||
page.get("https://www.douyin.com/")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user