mirror of
https://github.com/imputnet/cobalt.git
synced 2026-01-02 13:01:14 +00:00
clean up
This commit is contained in:
@@ -17,7 +17,7 @@ function selector(j, h, id) {
|
||||
let t;
|
||||
switch (h) {
|
||||
case "tiktok":
|
||||
t = j["aweme_list"].filter((v) => { if (v["aweme_id"] === id) return true })[0];
|
||||
t = j["aweme_list"].filter(v => v["aweme_id"] === id)[0];
|
||||
break;
|
||||
case "douyin":
|
||||
t = j['aweme_detail'];
|
||||
@@ -92,7 +92,7 @@ export default async function(obj) {
|
||||
let imageLinks = [];
|
||||
for (let i in images) {
|
||||
let sel = obj.host === "tiktok" ? images[i]["display_image"]["url_list"] : images[i]["url_list"];
|
||||
sel = sel.filter((p) => { if (p.includes(".jpeg?")) return true; })
|
||||
sel = sel.filter(p => p.includes(".jpeg?"))
|
||||
imageLinks.push({url: sel[0]})
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user