File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ private MTGWallpaper parseJson(JsonObject el) {
9494 pic .setUrl (URI .create (el .get ("large_file_url" ).getAsString ()));
9595 pic .setPublishDate (Date .from (OffsetDateTime .parse (el .get ("updated_at" ).getAsString ()).toInstant ()));
9696 pic .setUserAgent (userAgent );
97-
97+ pic . setMature ( true );
9898
9999 for (var s : el .get ("tag_string" ).getAsString ().split (" " ))
100100 pic .getTags ().add (s );
Original file line number Diff line number Diff line change @@ -15,17 +15,14 @@ public class ImagePoster {
1515
1616 public static String upload (String wallUrl ) throws IOException {
1717 var baseUrl = "https://postimages.org/" ;
18-
19- var uploadSession = new Date ().getTime () + Double .toString (Math .random ()).substring (1 );
2018 var client = URLTools .newClient ();
21-
2219 var jsonRet = RequestBuilder .build ().setClient (client ).post ().url (baseUrl +"/json/rr" )
2320 .addHeader ("x-requested-with" ,"XMLHttpRequest" )
2421 .addHeader (URLTools .ORIGIN , baseUrl )
2522 .addHeader (URLTools .REFERER , baseUrl +"/web" )
2623 .addHeader (URLTools .ACCEPT , URLTools .HEADER_JSON )
2724 .addHeader ("Cache-Control" , "no-cache" )
28- .addContent ("upload_session" , uploadSession )
25+ .addContent ("upload_session" , new Date (). getTime () + Double . toString ( Math . random ()). substring ( 1 ) )
2926 .addContent ("optsize" , "0" )
3027 .addContent ("expire" , "1" )
3128 .addContent ("url" , wallUrl )
You can’t perform that action at this time.
0 commit comments