package com.crossbowffs.quotelock.modules.hitokoto;

import android.content.ComponentName;
import android.content.Context;
import com.crossbowffs.quotelock.R;
import com.crossbowffs.quotelock.api.QuoteData;
import com.crossbowffs.quotelock.api.QuoteModule;
import com.crossbowffs.quotelock.utils.IOUtils;
import org.json.JSONException;

import java.io.IOException;

public class HitokotoQuoteModule implements QuoteModule {
    private static final String TAG = HitokotoQuoteModule.class.getSimpleName();

    @Override
    public String getDisplayName(Context context) {
        return context.getString(R.string.module_hitokoto_name);
    }

    @Override
    public ComponentName getConfigActivity(Context context) {
        return null;
    }

    @Override
    public int getMinimumRefreshInterval(Context context) {
        return 0;
    }

    @Override
    public boolean requiresInternetConnectivity(Context context) {
        return true;
    }

    @Override
    public QuoteData getQuote(Context context) throws IOException, JSONException {
        String quote = IOUtils.downloadString("https://api.lwl12.com/hitokoto/main/get");
        return new QuoteData(quote, "");
    }
}

@@ -328,16 +328,44 @@
 ception;
+%0Aimport org.json.JSONObject;
 %0A%0Aimport
@@ -1094,16 +1094,20 @@
 ng quote
+Json
  = IOUti
@@ -1137,43 +1137,233 @@
 s://
+ssl
 api.
-lwl12.com/hitokoto/main/get
+hitokoto.cn/%22);%0A%0A        JSONObject quoteJsonObject = new JSONObject(quoteJson);%0A        String quoteText = quoteJsonObject.getString(%22hitokoto%22);%0A        String quoteSource = %22%E2%80%95%22 + quoteJsonObject.getString(%22from
 %22);%0A
+%0A
     
@@ -1396,12 +1396,25 @@
 uote
-, %22%22
+Text, quoteSource
 );%0A 

Change the source of Hitokoto to Hitokoto.cn.