[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [gettor/develop] Add file for fetching latest Orfox version
commit ab66a2c7b58ad3415335c33d0651e7d0dd01f2c9
Author: Sukhbir Singh <sukhbir@xxxxxxxxxxxxxx>
Date: Sat Feb 27 11:01:19 2016 -0500
Add file for fetching latest Orfox version
---
orfox.py | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/orfox.py b/orfox.py
new file mode 100644
index 0000000..eb2ee4b
--- /dev/null
+++ b/orfox.py
@@ -0,0 +1,15 @@
+import urllib2
+import xml.etree.ElementTree as ET
+
+URL = "https://guardianproject.info/fdroid/repo/index.xml"
+PACKAGE = "https://guardianproject.info/fdroid/repo/"
+
+PATH = ".//application[13]/package/"
+
+def orfox_data():
+ tree = ET.fromstring(urllib2.urlopen(URL).read())
+
+ package_name = PACKAGE + tree.find(PATH + "apkname").text
+ package_version = tree.find(PATH + "version").text.rsplit("-")[-1]
+
+ return package_name, package_version
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits