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
Find url in a new way #56
Conversation
Pull Request Test Coverage Report for Build 119
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good. Thanks for doing this. I've added a few comments.
: $mime =~ m{video/3gp;} ? '3gp' | ||
: 'flv' | ||
; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would https://metacpan.org/pod/MIME::Type help here? Specifically subType()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return $stype
now?
t/youtube.t
Outdated
check_video_fetch_url('Y1I1KcKvz9Q'); | ||
|
||
# YAPC video 2 | ||
# YAPC video 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the line endings here. Do any of the examples in this test trigger _is_new()
? It would be helpful to cover both cases. This test will only be run if P5_YOUTUBE_NETWORK_TESTS
, so we don't have to worry about the average test case for the end user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t/data/player_response.html
is trimmed from curl -o ...
the first YAPC video. Getting the old content as a test might be a challenge.
227bb87
to
ef68dbb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is failing on 5.10 because it can't find Mock::Quick
for some reason. This might be a good time for me to move the repo to GitHub Actions. I can test it out there.
return 1 unless ($args->{fmt_list} and $args->{url_encoded_fmt_stream_map}); | ||
return 0; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose we could add a very simple unit test for this as well, to ensure that it is covered.
@@ -578,6 +622,8 @@ Parses given URL and returns playlist ID. | |||
|
|||
Parses given URL and returns YouTube username. | |||
|
|||
=item B<get_video_id($video_id)> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I just switched to GitHub workflows. Could you delete |
also pass CI additional test of new path
Rebased and all green. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kiwiroy!
This is now on CPAN. |
This fixes #55, although I'm unsure how long this fix will be successful.
There's some ancillary toolchain/linting edits included so that Travis has a green light - hope that's ok.