mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-01-06 01:20:32 +05:30
Bandcamp: Generate query JSON in a proper way
This commit is contained in:
parent
c133190c53
commit
67de0285e1
@ -2,10 +2,7 @@
|
|||||||
|
|
||||||
package org.schabi.newpipe.extractor.services.bandcamp.extractors;
|
package org.schabi.newpipe.extractor.services.bandcamp.extractors;
|
||||||
|
|
||||||
import com.grack.nanojson.JsonArray;
|
import com.grack.nanojson.*;
|
||||||
import com.grack.nanojson.JsonObject;
|
|
||||||
import com.grack.nanojson.JsonParser;
|
|
||||||
import com.grack.nanojson.JsonParserException;
|
|
||||||
import org.jsoup.Jsoup;
|
import org.jsoup.Jsoup;
|
||||||
import org.schabi.newpipe.extractor.NewPipe;
|
import org.schabi.newpipe.extractor.NewPipe;
|
||||||
import org.schabi.newpipe.extractor.StreamingService;
|
import org.schabi.newpipe.extractor.StreamingService;
|
||||||
@ -43,7 +40,12 @@ public class BandcampChannelExtractor extends ChannelExtractor {
|
|||||||
NewPipe.getDownloader().post(
|
NewPipe.getDownloader().post(
|
||||||
"https://bandcamp.com/api/mobile/22/band_details",
|
"https://bandcamp.com/api/mobile/22/band_details",
|
||||||
null,
|
null,
|
||||||
("{\"band_id\":\"" + id + "\"}").getBytes()
|
JsonWriter.string()
|
||||||
|
.object()
|
||||||
|
.value("band_id", id)
|
||||||
|
.end()
|
||||||
|
.done()
|
||||||
|
.getBytes()
|
||||||
).responseBody()
|
).responseBody()
|
||||||
);
|
);
|
||||||
} catch (IOException | ReCaptchaException | JsonParserException e) {
|
} catch (IOException | ReCaptchaException | JsonParserException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user