-
Notifications
You must be signed in to change notification settings - Fork 19
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
The YoutubeEmbed Plugin #7
Comments
Sorry I had the wrong notice setting and was only able to notice your issue just now. Extracting attribute values using css selectors is currently impossible -- Will think about it... |
Hmm... this is what |
That being said, I'll try to add the feature to |
Ahh, turned out that it is supported now. See https://github.com/suntong/cascadia/wiki#attribute-selection
|
@suntong, thank you for your comments! However, my point was to extract BOTH the text AND the YouTube's iframe's source :) (To make some random web page actually readable in the terminal). With
when it doesn't strips HTML :) But may be there's some workaround? To keep both the text and the iframe's source? Thanks again :) |
On a second thought, please, consider this example:
which will produce the following output:
So, if Those What do you think? |
In that case, maybe take a look at the |
May be I'm doing something wrong but I added it to the sample command, and it changes nothing for me? |
Ah, yeah, me neither, and I tried the input from And it turns out to be caused by #1:
I don't have time to look into it further now. |
No problem, it's nothing urgent. Thank you for your interest anyway :) |
Hmm, please
thanks |
The funny thing is, it's not even a function. I mean, I'm not a programmer at all, so I'm probably missing the elephant in the room, but any other plugin you do map in prop_html2md.go, and what do you do with this? |
That's what I meant by "ask him to remove the EXPERIMENTAL". IE, change the Just tell him that you're not a programmer at all, and you have no way to debug the YoutubeEmbed Plugin yourself other than through html2md. Hope that he'd agree with it. But honestly, if you don't know the
command to build html2md yourself, you might find it very difficult to discuss in details with him what you want out of the Plugin, and have to accept whatever the plugin is doing as-is. |
Ahh, I know what you meant now. Yes, I agree with you, I have no idea how to use it unless it is a function. OK. let me talk to him instead. |
So, coming back to this issue, I see that it seems this was fixed upstream, and you have also released a new version :) However, the example mentioned above:
still doesn't work for me. Is it the same for you (or have you managed to extract YouTube links from any actual page), or am I missing something? Thank you :) |
Per JohannesKaufmann/html-to-markdown#65, there is a new way of doing it -- using iframe plugins, but I haven't got around checking it yet. Have you made any progress using the new version? |
Well, from a user's perspective, nothing has changed, hasn't it? In order to call the |
Well, if it works it works, if it doesn't then doesn't, as "nothing has changed" in this project yet. The key is try to make it work when it doesn't, however I don't have time to look into it (and your other issue #19) now and even in near future, about 3 to 5 month, as I'm suppose to be on holiday and relax since 22th, but the reality was that I had been working days and nights, over 12am midnight each day, and even Christmas and boxing days were not any exception. I encourage you to reach out to upstream and try to figure out how it suppose to work meanwhile. |
So, indeed try to relax, and sorry for bothering you :) Have a good time, we'll come back to this :) |
@suntong, I hope you are doing well! Speaking of YouTube support, it looks that when releasing the last version, you simply forgot to enable it here: Line 131 in ec1b5c2
(Same goes for So, TL;DR: after un-commenting the aforesaid lines, it seems to work:
I will leave the issue open for now but feel free to close it, since the problem indeed was solved upstream. |
Lines 128 to 133 in 423fe1c
So I've just un-commented the aforesaid lines, but it's not enough for me, I'm getting
How did you make it work please? |
Donno, something on your side, I'd say :) I simply clone this repo, disable Vimeo (since, as I said, it throws an error), then run
And that's it. |
Hmm... it won't be as simple as that, as the error was:
not enough arguments in call to plugin.VimeoEmbed
have ()
want (plugin.vimeoVariation)
I.e., some changes have to be made to the code apart from merely enabling
the commented code.
I don't have time to look into it now, maybe in a month or so.
…On Sat, Feb 10, 2024 at 11:31 PM 097115 ***@***.***> wrote:
Donno, something on your side, I'd say :)
I simply clone this repo, disable Vimeo (since, as I say, it throws an
error
<https://github.com/suntong/html2md/actions/runs/7857583150/job/21441636314>),
then run
- go mod init html2md_main.go
- go mod tidy
- go build -o html2md
And that's it.
—
Reply to this email directly, view it on GitHub
<#7 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADHCZE4IL73QN24RAGYM7TYTA2BXAVCNFSM6AAAAAAU3ZTQBKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZXGQYDOMRRGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Oh, "disable Vimeo", ok, will try ...
…On Tue, Feb 13, 2024 at 11:37 AM Tong Sun ***@***.***> wrote:
Hmm... it won't be as simple as that, as the error was:
not enough arguments in call to plugin.VimeoEmbed
have ()
want (plugin.vimeoVariation)
I.e., some changes have to be made to the code apart from merely enabling
the commented code.
I don't have time to look into it now, maybe in a month or so.
On Sat, Feb 10, 2024 at 11:31 PM 097115 ***@***.***> wrote:
> Donno, something on your side, I'd say :)
>
> I simply clone this repo, disable Vimeo (since, as I say, it throws an
> error
> <https://github.com/suntong/html2md/actions/runs/7857583150/job/21441636314>),
> then run
>
> - go mod init html2md_main.go
> - go mod tidy
> - go build -o html2md
>
> And that's it.
>
> —
> Reply to this email directly, view it on GitHub
> <#7 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AADHCZE4IL73QN24RAGYM7TYTA2BXAVCNFSM6AAAAAAU3ZTQBKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZXGQYDOMRRGM>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
html-to-markdown Release v1.6.0 is out, with update to YoutubeEmbed plugin. I'll find some time to work on this, to catch up with upstream... |
Duh! It's fixed already!! https://github.com/suntong/html2md/releases/tag/v1.5.0 |
@suntong, great work! Thanks :) |
E.g., let's say we have an embedded YouTube iframe. Then this command
...will return just:
Ma be it could catch the iframe's
src
and return it instead of iframe? Like:The text was updated successfully, but these errors were encountered: