Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Commit

Permalink
update: use real fixed dm_img_str and dm_cover_img_str
Browse files Browse the repository at this point in the history
  • Loading branch information
muedsa committed Nov 30, 2023
1 parent 70fe226 commit 965e8e6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ public class BilibiliApiContainer {

public static final String DISABLED_WEB_GL = "bm8gd2ViZ2";

public static final String DM_IMG_STR = "V2ViR0wgMS4wIChPcGVuR0wgRVMgMi4wIENocm9taXVtKQ";

public static final String DM_COVER_IMG_STR = "QU5HTEUgKEludGVsLCBJbnRlbChSKSBVSEQgR3JhcGhpY3MgNjMwICgweDAwMDA5QkM4KSBEaXJlY3QzRDExIHZzXzVfMCBwc181XzAsIEQzRDExKUdvb2dsZSBJbmMuIChJbnRlbC";
}
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,11 @@ public BilibiliResponse<SpaceSearchResult> spaceSearch(int pageNum, int pageSize
params.put(BilibiliApiContainer.QUERY_KEY_PS, pageSize);
params.put(BilibiliApiContainer.QUERY_KEY_INDEX, 1);
params.put(BilibiliApiContainer.QUERY_KEY_ORDER, BilibiliApiContainer.ORDER_BY_PUBLIC_DATE);
params.put(BilibiliApiContainer.QUERY_KEY_ORDER_AVOIDED, this);
params.put(BilibiliApiContainer.QUERY_KEY_ORDER_AVOIDED, true);
params.put(BilibiliApiContainer.QUERY_KEY_PLATFORM, BilibiliApiContainer.PLATFORM_WEB);
params.put(BilibiliApiContainer.QUERY_KEY_WEB_LOCATION, BilibiliApiContainer.WEB_LOCATION_SPACE);
params.put(BilibiliApiContainer.QUERY_KEY_DM_IMG_STR, BilibiliApiContainer.DISABLED_WEB_GL);
params.put(BilibiliApiContainer.QUERY_KEY_DM_COVER_IMG_STR, BilibiliApiContainer.DISABLED_WEB_GL);
params.put(BilibiliApiContainer.QUERY_KEY_DM_IMG_STR, BilibiliApiContainer.DM_IMG_STR);
params.put(BilibiliApiContainer.QUERY_KEY_DM_COVER_IMG_STR, BilibiliApiContainer.DM_COVER_IMG_STR);
WbiUtil.fillWbiParams(params, mixinKey);
return httpJsonClient.getJson(ApiUtil.buildUrlWithParams(ApiUrlContainer.SPACE_SEARCH, params),
new TypeReference<BilibiliResponse<SpaceSearchResult>>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,15 +297,11 @@ public void videoDanmakuSegmentTest() throws IOException {
DmWebViewReply dmWebViewReply = client.videoDanmakuView(oid);
Assertions.assertTrue(dmWebViewReply.hasDmSge());
Assertions.assertTrue(dmWebViewReply.getDmSge().hasTotal());
int count = 0;
logger.info("oid:" + oid + ", page total:" + dmWebViewReply.getDmSge().getTotal());
for (int i = 1; i < dmWebViewReply.getDmSge().getTotal() + 1; i++) {
for (int i = 1; i < 5; i++) {
DmSegMobileReply dmSegMobileReply = client.videoDanmakuSegment(oid, i);
Assertions.assertNotNull(dmSegMobileReply);
count += dmSegMobileReply.getElemsCount();
logger.info("oid:" + oid + ", index:" + i + " count:" + dmSegMobileReply.getElemsCount());
}
logger.info("oid:" + oid + ", danmaku count:" + count);
}

@Test
Expand Down Expand Up @@ -366,6 +362,7 @@ public void spaceSearchTest() throws IOException {
BilibiliResponse<SpaceSearchResult> response = client.spaceSearch(1, 50, 423895,
WbiUtil.getMixinKey(wbiImg.getImgKey(), wbiImg.getSubKey()));
Assertions.assertNotNull(response);
Assertions.assertEquals(response.getCode(), 0, response.getMessage());
Assertions.assertNotNull(response.getData());
Assertions.assertNotNull(response.getData().getList());
List<SearchVideoInfo> list = response.getData().getList().getVlist();
Expand Down

0 comments on commit 965e8e6

Please sign in to comment.