Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lasers
NewPipeExtractor
Commits
1a9bc8ca
Unverified
Commit
1a9bc8ca
authored
Oct 16, 2020
by
Tobias Groza
Committed by
GitHub
Oct 16, 2020
Browse files
Merge pull request #414 from Scrxtchy/soundcloud-slash
Remove tailing slash from SoundCloud URLs
parents
9a785f9a
6a70cb9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/extractors/SoundcloudStreamExtractor.java
View file @
1a9bc8ca
...
...
@@ -46,7 +46,7 @@ public class SoundcloudStreamExtractor extends StreamExtractor {
@Override
public
void
onFetchPage
(
@Nonnull
Downloader
downloader
)
throws
IOException
,
ExtractionException
{
track
=
SoundcloudParsingHelper
.
resolveFor
(
downloader
,
get
Original
Url
());
track
=
SoundcloudParsingHelper
.
resolveFor
(
downloader
,
getUrl
());
String
policy
=
track
.
getString
(
"policy"
,
EMPTY_STRING
);
if
(!
policy
.
equals
(
"ALLOW"
)
&&
!
policy
.
equals
(
"MONETIZE"
))
{
...
...
extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/linkHandler/SoundcloudStreamLinkHandlerFactory.java
View file @
1a9bc8ca
...
...
@@ -30,6 +30,8 @@ public class SoundcloudStreamLinkHandlerFactory extends LinkHandlerFactory {
@Override
public
String
getId
(
String
url
)
throws
ParsingException
{
Utils
.
checkUrl
(
URL_PATTERN
,
url
);
// Remove the tailing slash from URLs due to issues with the SoundCloud API
if
(
url
.
charAt
(
url
.
length
()
-
1
)
==
'/'
)
url
=
url
.
substring
(
0
,
url
.
length
()-
1
);
try
{
return
SoundcloudParsingHelper
.
resolveIdWithEmbedPlayer
(
url
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment