1
0
mirror of https://github.com/akaessens/NoFbEventScraper synced 2025-06-05 23:29:13 +02:00

6 Commits

Author SHA1 Message Date
1570742462 prepare v0.3.1 2020-08-29 12:32:28 +02:00
0950da98e1 use correct user agent and add legal info 2020-08-29 12:28:28 +02:00
15ef35ba6c fix default scraper setting 2020-08-29 12:07:23 +02:00
55e7ad44d8 Merge branch 'master' of github.com:akaessens/NoFbEventScraper into master 2020-08-28 21:54:10 +02:00
2d3d2a2ab6 fix url settings string 2020-08-28 21:53:58 +02:00
dd36c1fb00 Update README.md 2020-08-28 21:43:45 +02:00
7 changed files with 21 additions and 7 deletions

View File

@ -1,5 +1,7 @@
![Android CI](https://github.com/akaessens/NoFbEventScraper/workflows/Android%20CI/badge.svg)
<img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/featureGraphic.png" alt="Feature Graphic" width="max-width">
# NoFb Event Scraper
This application was developed to be used without a facebook account.
@ -11,7 +13,7 @@ This source contains the information which is used to create a calendar entry.
# Download
Currently this application is in the submitting process to FDroid. see also [#2](/../../issues/2).
Until it is published at FDroid, use [release v0.2.2](https://github.com/akaessens/NoFbEventScraper/releases/download/v0.2.2/app-release.apk).
Until it is published at FDroid, use [release v0.3.1](https://github.com/akaessens/NoFbEventScraper/releases/download/v0.3.1/app-release.apk).
# Screenshots

View File

@ -8,8 +8,8 @@ android {
applicationId "com.akdev.nofbeventscraper"
minSdkVersion 26
targetSdkVersion 29
versionCode 6
versionName "0.3.0"
versionCode 7
versionName "0.3.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -4,6 +4,8 @@
<h3>Open Source</h3>
<p>The source code for this application is available at <a href=" https://github.com/akaessens/NoFbEventScraper">GitHub</a>.<strong><br /></strong></p>
<p>If you encounter an issue, please report it to me anonymously at the <a href="https://gitreports.com/issue/akaessens/NoFbEventScraper">Bugtracker</a> or directly at <a href="https://github.com/akaessens/NoFbEventScraper/issues">GitHub</a>.</p>
<h3>Legal</h3>
<p>This application is intended for saving single, publicly available events into a personal calendar. Do not use it to automatically collect data and comply with facebook's <a href="http://www.facebook.com/apps/site_scraping_tos_terms.php">Automated Data Collection Terms</a>.</p>
<h3>Donations</h3>
<p>I develop this application in my free time. If you like it, you can donate at <a href="https://www.paypal.me/andreaskaessens">PayPal</a>.</p>
<p><a title="PayPal" href="https://www.paypal.me/andreaskaessens"><img src="https://www.paypalobjects.com/webstatic/de_DE/i/de-pp-logo-100px.png" /></a></p>

View File

@ -192,8 +192,13 @@ public class FbScraper extends AsyncTask<Void, Void, Void> {
try {
String url = fixURI(input_url);
// useragent needed with Jsoup > 1.12
Document document = Jsoup.connect(url).userAgent("Mozilla").get();
// use correct system user agent because of facebook ToS
String user_agent = System.getProperty("http.agent");
Document document = Jsoup.connect(url).userAgent(user_agent).get();
if (document == null) {
throw new IOException();
}
String json = document
.select("script[type = application/ld+json]")
.first().data();
@ -219,6 +224,9 @@ public class FbScraper extends AsyncTask<Void, Void, Void> {
} catch (IOException e) {
e.printStackTrace();
this.error = "Error: Unable to connect.";
} catch (Exception e) {
e.printStackTrace();
this.error = "Error: Unknown Error.";
}
return null;

View File

@ -13,7 +13,7 @@
<string name="url_setting">Which URL to scrape</string>
<string name="url_setting_summary">
Using m.facebook.com is more stable and faster. Using www.facebook.com gives high-res images and works better with mutiple instance events but will eventually break when facebook disables the classic design.
Using m.facebook.com is more stable and faster. Using www.facebook.com works better with multiple instance events but will eventually break when facebook disables the classic design.
</string>
</resources>

View File

@ -5,7 +5,7 @@
<ListPreference
app:defaultValue="m.facebook.com"
app:defaultValue="https://m."
app:entries="@array/url_to_scrape"
app:entryValues="@array/url_prefix"
app:key="url_preference"

View File

@ -0,0 +1,2 @@
Fix invalid default uri.
Update about section.