Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search for videos by id, not by title #482

Closed
2 of 4 tasks
Galaxy773 opened this issue Dec 2, 2022 · 4 comments
Closed
2 of 4 tasks

Search for videos by id, not by title #482

Galaxy773 opened this issue Dec 2, 2022 · 4 comments

Comments

@Galaxy773
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

I'm submitting a ...

Description

old code (basics.py):
find_video = section.find_element( By.XPATH, f'//*[@title="{video_title}"]')
new code:
find_video = section.find_element( By.XPATH, f'//a[contains(@href,"v={video_id}")]')
video_id can be taken from one of the urls

Environment

OS : Ubuntu 20.04
Python : 3.9.10 / EXE without Python
Script version : 1.7.1

config.json

config.json
@furjac
Copy link

furjac commented Dec 2, 2022

no bro it is searched by title for easier use

@Galaxy773
Copy link
Author

@furjac, If there is a video with the same title as yours in the search, the program may open someone else's, but if you search by video_id, this will not happen. Also, you no longer have to type the name of the video into the search.txt file, which makes it a little easier.

@furjac
Copy link

furjac commented Dec 2, 2022

Yes ur right

@furjac
Copy link

furjac commented Dec 3, 2022

but how u will search the video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants