Last active
June 8, 2019 17:57
-
-
Save KonradIT/d1d6dfeebc39530f9e38fc47f83af722 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
01.04.2015 | |
Strike ID: HOD10001 | |
clean | |
https://touch.facebook.com/graphsearch/str/مصنع الألبان/stories-keyword/1/apr/2015/date-3/2/apr/2015/date-3/stories-2/intersect?f= | |
12.12.2015 | |
Strike ID: SAN10001 | |
clean | |
https://touch.facebook.com/graphsearch/str/.مصنع كوكا كولا/stories-keyword/12/dec/2015/date-3/13/dec/2015/date-3/stories-2/intersect?f= | |
June-July 2015 | |
Strike ID: SAA10001 | |
08.01.2016 | |
Strike ID: TAI10001 | |
clean | |
https://touch.facebook.com/graphsearch/str/تحلية المياه | |
/stories-keyword/8/jan/2016/date-3/9/jan/2016/date-3/stories-2/intersect?f= | |
August 2016 | |
Strike ID: SAN10002 | |
28.01.2016 | |
Strike ID: SAA10002 | |
clean | |
https://touch.facebook.com/graphsearch/str/مزارع كتاف/stories-keyword/28/jan/2016/date-3/29/jan/2016/date-3/stories-2/intersect?f= | |
30.08.2018 | |
Strike ID: HOD10002 | |
clean | |
https://touch.facebook.com/graphsearch/str/.جزيرة كمران/stories-keyword/30/aug/2018/date-3/31/aug/2018/date-3/stories-2/intersect?f= | |
Strike ID: HAJ10001 | |
Strike ID: SAA10004 | |
30.08.2015 | |
Strike ID: HAJ10002 | |
clean | |
https://touch.facebook.com/graphsearch/str/مصنع الشام لتعبئة الزجاجات/stories-keyword/30/aug/2015/date-3/31/aug/2015/date-3/stories-2/intersect?f= | |
14.01.2016 | |
Strike ID: DHA10001 | |
clean | |
https://touch.facebook.com/graphsearch/str/مزرعة دواجن ذمار/stories-keyword/14/jan/2016/date-3/15/jan/2016/date-3/stories-2/intersect?f= | |
06.05.2018 | |
Strike ID: HAJ10040 | |
clean | |
https://touch.facebook.com/graphsearch/str/قصف جسر بني قيص/stories-keyword/6/may/2018/date-3/7/may/2018/date-3/stories-2/intersect?f= | |
10.01.2016 | |
Strike ID: TAI10003 | |
clean | |
https://touch.facebook.com/graphsearch/str/تعز المخا/stories-keyword/10/jan/2016/date-3/11/jan/2016/date-3/stories-2/intersect?f= | |
15.04.2015 | |
Strike ID: SAA10005 | |
clean | |
https://touch.facebook.com/graphsearch/str/محطة بترول صعدة/stories-keyword/15/apr/2015/date-3/16/apr/2015/date-3/stories-2/intersect?f= | |
26.05.2018 | |
Strike ID: SAN10006 | |
clean | |
https://touch.facebook.com/graphsearch/str/محطة بترول صنعاء/stories-keyword/26/may/2018/date-3/27/may/2018/date-3/stories-2/intersect?f= | |
16.01.2017 | |
Strike ID: SAA10007 | |
clean | |
https://touch.facebook.com/graphsearch/str/محطة وقود/stories-keyword/16/jan/2017/date-3/17/jan/2017/date-3/stories-2/intersect?f= | |
2015 | |
Strike ID: SAA10008 | |
07.08.2016 or 09.08.2016 | |
Strike ID: SAN10003 | |
15.08.2016 | |
Strike ID: HAJ10007 | |
clean | |
https://touch.facebook.com/graphsearch/str/مستشفى حجة/stories-keyword/15/aug/2016 /date-3/16/aug/2016 /date-3/stories-2/intersect?f= | |
10.02.2016 | |
Strike ID: SAA10013 | |
clean | |
https://touch.facebook.com/graphsearch/str/مستشفى صعدة/stories-keyword/10/feb/2016 /date-3/11/feb/2016 /date-3/stories-2/intersect?f= | |
26.03.2019 | |
Strike ID: SAA20011 | |
clean | |
https://touch.facebook.com/graphsearch/str/مستشفى صعدة/stories-keyword/26/mar/2019/date-3/27/mar/2019/date-3/stories-2/intersect?f= | |
26.10.2015 | |
Strike ID: SAA10014 | |
clean | |
https://touch.facebook.com/graphsearch/str/مستشفى صعدة/stories-keyword/26/oct/2015/date-3/27/oct/2015/date-3/stories-2/intersect?f= | |
02.12.2015 | |
Strike ID: TAI10007 | |
clean | |
https://touch.facebook.com/graphsearch/str/مستشفى تعز/stories-keyword/2/dec/2015/date-3/3/dec/2015/date-3/stories-2/intersect?f= | |
18.09.2015 | |
Strike ID: SAN10008 | |
clean | |
https://touch.facebook.com/graphsearch/str/صنعاء/stories-keyword/18/sep/2015/date-3/19/sep/2015/date-3/stories-2/intersect?f= | |
20.09.2016 | |
Strike ID: SAN10009 | |
clean | |
https://touch.facebook.com/graphsearch/str/صنعاء/stories-keyword/20/sep/2016/date-3/21/sep/2016/date-3/stories-2/intersect?f= | |
Strike ID: DHA10003 | |
Strike ID: JAW10001 | |
9.2015 | |
Strike ID: SAA10015 | |
09.01.2017 | |
Strike ID: SAN10010 | |
clean | |
https://touch.facebook.com/graphsearch/str/قصفت المدرسة/stories-keyword/9/jan/2017/date-3/10/jan/2017/date-3/stories-2/intersect?f= | |
18.01.2016 | |
Strike ID: SAN10011 | |
clean | |
https://touch.facebook.com/graphsearch/str/الرياضة قصفت/stories-keyword/18/jan/2016/date-3/19/jan/2016/date-3/stories-2/intersect?f= | |
11.12.2017 | |
Strike ID: HOD10008 | |
clean | |
https://touch.facebook.com/graphsearch/str/هايز مستشفى/stories-keyword/11/dec/2017/date-3/12/dec/2017/date-3/stories-2/intersect?f= | |
30.01.2017 | |
Strike ID: SAA10016 | |
clean | |
https://touch.facebook.com/graphsearch/str/مران/stories-keyword/30/jan/2017/date-3/31/jan/2017/date-3/stories-2/intersect?f= | |
13.11.2016 | |
Strike ID: SAN10012 | |
clean | |
https://touch.facebook.com/graphsearch/str/كوكبان/stories-keyword/13/nov/2016/date-3/14/nov/2016/date-3/stories-2/intersect?f= | |
30.01.2016 | |
Strike ID: SAN10013 | |
clean | |
https://touch.facebook.com/graphsearch/str/جامعة الملكة أروى/stories-keyword/30/jan/2016/date-3/31/jan/2016/date-3/stories-2/intersect?f= | |
02.08.2018 | |
Strike ID: HOD10009 | |
clean | |
https://touch.facebook.com/graphsearch/str/مستشفى تعز/stories-keyword/2/aug/2018/date-3/3/aug/2018/date-3/stories-2/intersect?f= | |
22.04.2018 | |
Strike ID: HAJ 10004 | |
clean | |
https://touch.facebook.com/graphsearch/str/بني قيس حفل زواج/stories-keyword/22/apr/2018/date-3/23/apr/2018/date-3/stories-2/intersect?f= | |
29.10.2016 | |
Strike ID: HOD10004 | |
clean | |
https://touch.facebook.com/graphsearch/str/سجن الزيدية/stories-keyword/29/oct/2016/date-3/30/oct/2016/date-3/stories-2/intersect?f= | |
27.10.2016 | |
Strike ID: HOD10005 | |
clean | |
https://touch.facebook.com/graphsearch/str/الخضروات قصفت/stories-keyword/27/oct/2016/date-3/28/oct/2016/date-3/stories-2/intersect?f= | |
03.06.2015 | |
Strike ID: SAA10010 | |
clean | |
https://touch.facebook.com/graphsearch/str/بني حوات/stories-keyword/3/jun/2015/date-3/4/jun/2015/date-3/stories-2/intersect?f= | |
15.03.2016 | |
Strike ID: HAJ10006 | |
clean | |
https://touch.facebook.com/graphsearch/str/سوق الخميس/stories-keyword/15/mar/2016/date-3/16/mar/2016/date-3/stories-2/intersect?f= | |
08.10.2016 | |
Strike ID: SAN10005 | |
clean | |
https://touch.facebook.com/graphsearch/str/قصف جنازة | |
/stories-keyword/8/oct/2016/date-3/9/oct/2016/date-3/stories-2/intersect?f= | |
21.01.2016 | |
Strike ID: SAA10011 | |
clean | |
https://touch.facebook.com/graphsearch/str/ضحيان/stories-keyword/21/jan/2016/date-3/22/jan/2016/date-3/stories-2/intersect?f= | |
24.10.2018 | |
Strike ID: HOD10007 | |
clean | |
https://touch.facebook.com/graphsearch/str/سوق قصفت/stories-keyword/24/oct/2018/date-3/25/oct/2018/date-3/stories-2/intersect?f= | |
27.06.2016 | |
Strike ID: TAI10006 | |
clean | |
https://touch.facebook.com/graphsearch/str/سوق هيفان/stories-keyword/27/jun/2016/date-3/28/jun/2016/date-3/stories-2/intersect?f= | |
19.09.2015 | |
Strike ID: SAA10012 | |
clean | |
https://touch.facebook.com/graphsearch/str/سوق المنبة/stories-keyword/19/sep/2015/date-3/20/sep/2015/date-3/stories-2/intersect?f= | |
13.06.2015 | |
Strike ID: SAN10015 | |
clean | |
https://touch.facebook.com/graphsearch/str/بيت مياد/stories-keyword/13/jun/2015/date-3/14/jun/2015/date-3/stories-2/intersect?f= | |
Strike ID: TAI10008 | |
Strike ID: SAN10021 | |
Strike ID: HOD10010 | |
30.01.2017 | |
Strike ID: SAA10016 | |
clean | |
https://touch.facebook.com/graphsearch/str/رحبان/stories-keyword/30/jan/2017/date-3/31/jan/2017/date-3/stories-2/intersect?f= | |
15.02.2017 or 08.02.2017 | |
Strike ID: SAN10015 | |
23.08.2017 | |
Strike ID: SAN10014 | |
clean | |
https://touch.facebook.com/graphsearch/str/أرحب الفندق/stories-keyword/23/aug/2017/date-3/24/aug/2017/date-3/stories-2/intersect?f= | |
25.08.2017 | |
Strike ID: SAN10016 | |
clean | |
https://touch.facebook.com/graphsearch/str/صنعاء/stories-keyword/25/aug/2017/date-3/26/aug/2017/date-3/stories-2/intersect?f= | |
17.10.2017 | |
Strike ID: JAW10002 | |
clean | |
https://touch.facebook.com/graphsearch/str/برط العنان/stories-keyword/17/oct/2017/date-3/18/oct/2017/date-3/stories-2/intersect?f= | |
Strike ID: HOD10011 | |
Strike ID: HAJ10008 | |
24.12.2017 | |
Strike ID: SAN10050 | |
clean | |
https://touch.facebook.com/graphsearch/str/صنعاء/stories-keyword/24/dec/2017/date-3/25/dec/2017/date-3/stories-2/intersect?f= | |
07.05.2018 | |
Strike ID: SAN10017 | |
clean | |
https://touch.facebook.com/graphsearch/str/القصر الرئاسي/stories-keyword/7/may/2018/date-3/8/may/2018/date-3/stories-2/intersect?f= | |
Strike ID: SAN10018 | |
13.07.2015-06.04.2016 | |
Strike ID: HOD10012 | |
Strike ID: AMR10002 | |
19.09.2015 | |
Strike ID: SAN10019 | |
clean | |
https://touch.facebook.com/graphsearch/str/وزارة الداخلية/stories-keyword/19/sep/2015/date-3/20/sep/2015/date-3/stories-2/intersect?f= | |
10.11.2017 | |
Strike ID: SAN10020 | |
clean | |
https://touch.facebook.com/graphsearch/str/وزارة الدفاع/stories-keyword/10/nov/2017/date-3/11/nov/2017/date-3/stories-2/intersect?f= | |
24.07.2017 | |
Strike ID: SAA10017 | |
clean | |
https://touch.facebook.com/graphsearch/str/صعدة/stories-keyword/24/jul/2017/date-3/25/jul/2017/date-3/stories-2/intersect?f= | |
05.12.2017 | |
Strike ID: SAN10021 | |
clean | |
https://touch.facebook.com/graphsearch/str/القصر الجمهوري/stories-keyword/5/dec/2017/date-3/6/dec/2017/date-3/stories-2/intersect?f= | |
02.05.2015 | |
Strike ID: SAA10018 | |
clean | |
https://touch.facebook.com/graphsearch/str/وزارة التربية/stories-keyword/2/may/2015/date-3/3/may/2015/date-3/stories-2/intersect?f= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
IDENTIFIER_STRIKE = "Strike ID " | |
IDENTIFIER_PRIMARY_KEYWORD = "Primary keyword" | |
IDENTIFIER_DAY = "Date (dd.mm.yyyy)" | |
FACEBOOK_URI = "https://touch.facebook.com/graphsearch/str/%s/stories-keyword/%s/%s/%s/date-3/%s/%s/%s/date-3/stories-2/intersect?f=" | |
def get_month(number): | |
months = { | |
1: "jan", | |
2: "feb", | |
3: "mar", | |
4: "apr", | |
5: "may", | |
6: "jun", | |
7: "jul", | |
8: "aug", | |
9: "sep", | |
10: "oct", | |
11: "nov", | |
12: "dec" | |
} | |
return months.get(number) | |
def is_clean(time): | |
return len(time.split(".")) == 3 | |
with open("Yemen Incident list - Sheet1.csv", newline='') as yemencsv: | |
reader = csv.DictReader(yemencsv) | |
for strike in reader: | |
data = {} | |
for desc, item in strike.items(): | |
data.update({desc: item}) | |
# Time calculation | |
raw_time = data.get(IDENTIFIER_DAY).replace("/", ".") | |
if ("?" not in raw_time): | |
print(data.get(IDENTIFIER_DAY)) | |
print("Strike ID: %s" % data.get(IDENTIFIER_STRIKE)) | |
word = data.get(IDENTIFIER_PRIMARY_KEYWORD) | |
if is_clean(raw_time): | |
print("clean") | |
prev_day = int(raw_time.split(".")[0]) | |
next_day = int(prev_day) + 1 | |
day = [prev_day, next_day] | |
number = get_month(int(raw_time.split(".")[1])) | |
month = [number, number] | |
year = [raw_time.split(".")[2], raw_time.split(".")[2]] | |
print( | |
FACEBOOK_URI % | |
(word, day[0], month[0], year[0], day[1], month[1], year[1])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment