diff --git a/app/src/main/java/com/akdev/nofbeventscraper/FbEventScraper.java b/app/src/main/java/com/akdev/nofbeventscraper/FbEventScraper.java index 84f78f2..9f6e8d3 100644 --- a/app/src/main/java/com/akdev/nofbeventscraper/FbEventScraper.java +++ b/app/src/main/java/com/akdev/nofbeventscraper/FbEventScraper.java @@ -1,6 +1,7 @@ package com.akdev.nofbeventscraper; import android.os.AsyncTask; +import android.util.Log; import org.json.JSONException; import org.json.JSONObject; @@ -143,6 +144,8 @@ public class FbEventScraper extends AsyncTask { @Override protected Void doInBackground(Void... voids) { + Log.d("scraperLog", "doInBackground: "+url); + Document document = DocumentReceiver.getDocument(url); try { diff --git a/app/src/main/java/com/akdev/nofbeventscraper/FbScraper.java b/app/src/main/java/com/akdev/nofbeventscraper/FbScraper.java index 2613cda..2794160 100644 --- a/app/src/main/java/com/akdev/nofbeventscraper/FbScraper.java +++ b/app/src/main/java/com/akdev/nofbeventscraper/FbScraper.java @@ -2,6 +2,7 @@ package com.akdev.nofbeventscraper; import android.content.SharedPreferences; import android.os.AsyncTask; +import android.util.Log; import androidx.preference.PreferenceManager; @@ -165,6 +166,7 @@ public class FbScraper { void scrapeEventResultCallback(FbEvent event, int error) { if (event != null) { + Log.d("scraperLog", "scrapeEventResultCallback: "+event.url); main.get().addEvent(event); main.get().input_helper(main.get().getString(R.string.done), false); } else if (url_type == url_type_enum.EVENT) { @@ -193,10 +195,11 @@ public class FbScraper { protected void scrapePageResultCallback(List event_urls, int error) { if (event_urls.size() > 0) { - + Log.d("scraperLog", "scrapePageResultCallback: "+event_urls.toString()); for (String event_url : event_urls) { try { String url = getEventUrl(event_url); + Log.d("scraperLog", "scrapePageResultCallback: "+url); scrapeEvent(url); } catch (URISyntaxException | MalformedURLException e) { // ignore this event @@ -210,11 +213,15 @@ public class FbScraper { protected void redirectUrl (String url) { FbRedirectionResolver resolver = new FbRedirectionResolver(this, url); + Log.d("scraperLog", "redirectUrl: "+url); + resolver.execute(); } protected void redirectionResultCallback(String url) { this.input_url = url; + Log.d("scraperLog", "redirectUrlCb: "+url); + // now try again with expanded url this.run(); }