|
9 | 9 | from .utils import URLValidator |
10 | 10 |
|
11 | 11 |
|
12 | | -def _cli_main( |
13 | | - link: str = typer.Argument(..., help='Video tweet link or target user\'s likes or media.'), |
14 | | - username: Optional[str] = typer.Option(None, help='Your twitter credentials username.'), |
15 | | - password: Optional[str] = typer.Option(None, help='Your twitter credentials password.'), |
16 | | - until_link: Optional[str] = typer.Option( |
17 | | - None, |
18 | | - help='Keeps finding videos until this link is found. None for no limit. Only for user\'s likes or media.', |
19 | | - ), |
| 12 | +def _cli_main( # pylint: disable=too-many-arguments |
| 13 | + link: str = typer.Argument(..., help='Video tweet link or target user\'s likes or media.'), |
| 14 | + username: Optional[str] = typer.Option(None, help='Your twitter credentials username.'), |
| 15 | + password: Optional[str] = typer.Option(None, help='Your twitter credentials password.'), |
| 16 | + until_link: Optional[str] = typer.Option( |
| 17 | + None, |
| 18 | + help='Keeps finding videos until this link is found. None for no limit. Only for user\'s likes or media.', |
| 19 | + ), |
| 20 | + output: str = typer.Option('videos', help='Output path for downloaded videos.'), |
| 21 | + debug: bool = typer.Option(False, help='Enable debug mode. This disables headless mode of Browser.'), |
20 | 22 | ) -> None: |
21 | 23 | url_validator = URLValidator(link) |
22 | 24 |
|
23 | 25 | if not url_validator.is_valid_link(): |
24 | 26 | rich_print(f'\'[underline]{link}[/underline]\' [bold red]is an invalid link.[/bold red]') |
25 | 27 | return |
26 | | - twitter_video_tools = TwitterVideoTools(username, password) |
| 28 | + twitter_video_tools = TwitterVideoTools(username, password, output, debug) |
27 | 29 |
|
28 | 30 | if url_validator.is_valid_twitter_media_link(): |
29 | 31 | target_username = link.split('/')[3] |
|
0 commit comments