-
Notifications
You must be signed in to change notification settings - Fork 17
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
Custom extractor #1
Comments
Hello,
Thanks for pointing this out. Turns out there was a bug where the custom
extractor was only being called for folders and not individual files. The
`--extractor` flag also just takes in the name of the file without the
.yaml (will improve later to accept both), so just putting `ytdl-nfo
--extractor single files.json` should work.
As for creating custom extractors I don't have the time to flesh out the
documents right now but what you did was correct. Creating a new extractor
with `{your_extractor_name}.yaml` in the `--config` and calling the command
is the intended use pattern.
For the actual extractor, the program is basically just a yaml template
processor: tags in the yaml with `{item}` in it will be replaced by that
item in the json file. There is some additional logic for handling date
formatting and attributes which you should be able to understand by just
running the youtube extractor and comparing the yaml to the output nfo.
Hope this helps. I intend to keep updating the program eventually when I
get more time so thank you for reaching out. Let me know if you need more
help.
owdevel
…On Sat, Apr 10, 2021 at 11:44 PM romariorobby ***@***.***> wrote:
I tried to use custom extractor and create inside ytdl-nfo --config and
run ytdl-nfo --extractor single.yaml files.json but it still use
youtube.yaml template. so i rename youtube.yaml but it gives me error
'FileNotFoundError: [Errno 2] No such file or directory:
'/home/user/.local/lib/python3.9/site-packages/ytdl_nfo/configs/youtube.yaml'.
did i missing something? and how to create custom extractor exactly? Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADES276Z5O7XJJ5RWPPMMVLTIBI4TANCNFSM42WQZE4Q>
.
|
Hmm, calling this command |
Hmm.. it seems to be working for me with the latest version. Have you updated the package through pip/cloning? Could you post an |
yes, i've been installed the latest version with this command ~ $ ytdl-nfo --config
/home/user/.local/lib/python3.9/site-packages/ytdl_nfo/configs
|
I tried to use custom extractor and create inside
ytdl-nfo --config
and runytdl-nfo --extractor single.yaml files.json
but it still use youtube.yaml template. so i rename youtube.yaml but it gives me error 'FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.local/lib/python3.9/site-packages/ytdl_nfo/configs/youtube.yaml'. did i missing something? and how to create custom extractor exactly? ThanksThe text was updated successfully, but these errors were encountered: