Comments (4)
Closed as the relevant PR was merged.
from lavaplayer.
Disabling cookie persistence for youtube searching fixes this. Tested method (using reflection):
class DabYoutubeAudioSourceManager extends YoutubeAudioSourceManager {
DabYoutubeAudioSourceManager() {
super(true);
try {
// getting the httpInterfaceManager variable
Field field = this.getClass().getSuperclass().getDeclaredField("httpInterfaceManager");
field.setAccessible(true);
// removing the final modifier
Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
// creating a new HttpClientBuilder with cookie management disabled
HttpClientBuilder httpClientBuilder = HttpClientTools.createSharedCookiesHttpBuilder()
.disableCookieManagement();
// creating a new HttpInterfaceManager with our HttpClientBuilder
HttpInterfaceManager httpInterfaceManager = new ThreadLocalHttpInterfaceManager(httpClientBuilder,
HttpClientTools.DEFAULT_REQUEST_CONFIG);
// setting the new value of the field
field.set(this, httpInterfaceManager);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
}
}
from lavaplayer.
Just to cover my bits when people say "there is no such (static) method in YoutubeAudioSourceManager
"
YoutubeAudioSourceManager youtube = new YoutubeAudioSourceManager(true);
youtube.configureRequests(config ->
RequestConfig.copy(config)
.setCookieSpec(CookieSpecs.IGNORE_COOKIES)
.build()
);
from lavaplayer.
Crosspost from Discord, since this seems to be the issue.
It's not a cookie problem, but it seems the DOM layout changed.
So, finally had the issue of not being able to search locally.
Peppered some breakpoints, and it seems the durationElement
is null.
So, hmmm, there is another video-time
related class in the DOM.
There's video-time-overlay
that seems to have the right content we need for the time computation.
from lavaplayer.
Related Issues (20)
- Youtube Master Token Update Failed HOT 2
- Error when Request YouTube Livestreams via YouTubes share-url
- Music Bot keeps connecting and disconnecting from the voice channel after /play command. HOT 3
- Bot has completely stopped playing music HOT 1
- Can't find YouTube playlists that are albums HOT 3
- crossfade feature
- Spotify Support HOT 4
- How to enable debug mode?
- libudpqueue.so: failed to map segment from shared object
- Unknown file format / Unsupported bits per sample HOT 1
- lavaplayer joins audio channel but errors and doesnt play only on Macos Ventura HOT 2
- Not success status code: 403 HOT 2
- How Lavaplayer seek YouTube video? HOT 4
- Bot just stopped playing tracks
- Lavaplayer stopped playing youtube links HOT 2
- playing music, but not sound
- Error HOT 3
- Lavaplayer completely stopped working without giving any errors HOT 3
- [email protected]() async def foo(ctx, arg): await ctx.send(arg)
- Something broke when playing the track happens every time i try to play a track HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lavaplayer.