Advertisement
John4711

vh-img

Dec 28th, 2021
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fetch("https://api.victoriahearts.com/profile/search", {
  2.   "headers": {
  3.     "accept": "application/json",
  4.     "content-type": "application/json"
  5.   },
  6.   "referrer": "https://victoriahearts.com/",
  7.   "referrerPolicy": "strict-origin-when-cross-origin",
  8.   "body": "{\"page\":1,\"limit\":50,\"q\":{\"ageFrom\":18,\"ageTo\":90,\"which\":\"all\",\"is_live_video_streaming\":null,\"is_streaming\":null,\"is_validated\":true,\"gender\":\"female\"},\"xq\":{\"is_online\":false,\"ageFrom\":18,\"ageTo\":90,\"is_live_video_streaming\":null,\"is_streaming\":null,\"is_validated\":true,\"id_country\":\"All countries\",\"id_city\":\"All cities\",\"marital_status\":\"\",\"count_children\":-1,\"religion\":\"\",\"education\":\"\",\"drinking\":0,\"smoking\":0,\"id_user\":\"\",\"gender\":\"female\"},\"extended\":false}",
  9.   "method": "POST",
  10.   "mode": "cors",
  11.   "credentials": "include"
  12. }).then(r=>r.json()).then(d=>{
  13.    window.lastP=d;
  14.    document.body.innerHTML=""; document.body.style.scrollSnapType="both mandatory";
  15.    for (var v of d.data.items) {
  16.       var img=document.createElement("img");img.style.height="100vh";img.style.objectFit="contain";img.style.marginLeft="60px";img.src=v.avatar_original;document.body.appendChild(img);img.setAttribute("userid",v.id);img.title=v.id;
  17.       img.onclick=function(){
  18.          fetch("https://api.victoriahearts.com/profile/get-photos/"+this.getAttribute("userid"), {"credentials": "include"}).then(r=>r.json()).then(d=>{console.log(d);
  19.          var w=window.open();w.document.body.style.backgroundColor="#262626";
  20.          var il=d.data.public.concat(d.data.private);console.log(il);
  21.          for (var v of il) {
  22.             var img=document.createElement("img");img.title=v.id;img.setAttribute("picid",v.id);
  23.             img.style.display="block";img.style.marginLeft="60px";//img.style.margin="5px";//img.style.align="left";
  24.             //img.style.width="100vw";
  25.             img.style.height="100vh";
  26.             img.style.objectFit="contain"; /* or object-fit: contain; */
  27.             img.src=v.url_original;w.document.body.appendChild(img);
  28.  
  29.  
  30.             }
  31.          })
  32.       }
  33.       /*fetch("https://api.victoriahearts.com/profile/get-photos/65204659", {
  34.   "headers": {
  35.     "accept": "application/json"
  36.    
  37.   },
  38.    "method": "POST",
  39.   "mode": "cors",
  40.   "credentials": "include"
  41. }); */
  42.       }
  43.  
  44.  
  45. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement