Req Sports scraper
I assume all the events have the time according to the same timezone? Pregmatch the start time and convert it to a constant timezone presenting it in the format %H:%M". Unix timestamps would be a nice idea but since I assume you want to use this also as a database for recordings there will be matches before 1970.

Here's the code snipped I use to use in python (don't know much about php):

Code:
import pytzimp

d = pytzimp.timezone(str(pytzimp.timezone('Atlantic/Azores'))).localize(datetime.datetime(2014, 11, 1, hour=hora, minute=minuto)))
my_location=pytzimp.timezone(pytzimp.all_timezones["my_location_timezone"])
converted=d.astimezone(my_location)
fmt =%H:%M"
time=converted.strftime(fmt)

In this case it receives the hour and minute as integers and convert it from timezone "Atlantic/Azores" to a timezone I specify.
I think trying to get the user location and convert it automatically to the corresponding timezone is sort of a waste of effort at the moment. Better decide a common timezone and present the results for this timezone only. Later on you can probably add to the webinterface something like the new wiziwig has (automatically detect the timezone and present a way to change it - or just the last):

http://www.getyourfixtures.com/
Reply


Messages In This Thread
Sports scraper - by n1md4 - 2013-10-02, 16:20
RE: Sports scraper - by Jeneration - 2013-10-03, 08:33
RE: Sports scraper - by zag - 2013-10-04, 13:15
RE: Sports scraper - by n1md4 - 2013-10-04, 21:17
RE: Sports scraper - by zag - 2013-10-04, 21:50
RE: Sports scraper - by n1md4 - 2013-10-05, 00:24
RE: Sports scraper - by zag - 2013-10-05, 10:22
RE: Sports scraper - by amalething - 2013-10-08, 12:02
RE: Sports scraper - by boodahbellie - 2014-01-17, 17:28
RE: Sports scraper - by zag - 2014-01-17, 17:48
RE: Sports scraper - by boodahbellie - 2014-01-17, 17:57
RE: Sports scraper - by groty - 2014-03-15, 05:00
RE: Sports scraper - by zag - 2014-03-15, 14:38
RE: Sports scraper - by boodahbellie - 2014-03-17, 17:55
RE: Sports scraper - by zag - 2014-03-17, 22:26
RE: Sports scraper - by fractalize - 2014-03-23, 16:12
RE: Sports scraper - by amalething - 2014-03-25, 15:17
RE: Sports scraper - by zag - 2014-03-25, 16:49
RE: Sports scraper - by schumi2004 - 2014-03-25, 17:21
RE: Sports scraper - by n1md4 - 2014-05-28, 17:15
RE: Sports scraper - by boodahbellie - 2014-05-29, 18:15
RE: Sports scraper - by Ovokx - 2014-07-10, 20:21
RE: Sports scraper - by karandras24 - 2014-07-13, 10:59
RE: Sports scraper - by Ovokx - 2014-07-13, 17:47
RE: Sports scraper - by karandras24 - 2014-07-13, 17:56
RE: Sports scraper - by Ovokx - 2014-07-13, 18:58
RE: Sports scraper - by karandras24 - 2014-07-13, 19:43
RE: Sports scraper - by schumi2004 - 2014-07-10, 20:26
RE: Sports scraper - by Ovokx - 2014-07-10, 20:44
RE: Sports scraper - by zag - 2014-07-11, 11:35
RE: Sports scraper - by schumi2004 - 2014-07-11, 11:47
RE: Sports scraper - by Ovokx - 2014-07-11, 20:03
RE: Sports scraper - by zag - 2014-07-11, 20:29
RE: Sports scraper - by BigGr33n - 2014-07-17, 14:56
RE: Sports scraper - by Ovokx - 2014-07-12, 13:12
RE: Sports scraper - by schumi2004 - 2014-07-13, 13:29
RE: Sports scraper - by zag - 2014-07-14, 10:37
RE: Sports scraper - by Ovokx - 2014-07-22, 19:05
RE: Sports scraper - by Ovokx - 2014-07-17, 16:28
RE: Sports scraper - by zag - 2014-07-18, 09:44
RE: Sports scraper - by BigGr33n - 2014-07-18, 15:20
RE: Sports scraper - by bry - 2014-07-18, 15:59
RE: Sports scraper - by zag - 2014-07-18, 20:20
RE: Sports scraper - by BigGr33n - 2014-07-18, 22:27
RE: Sports scraper - by Ovokx - 2014-07-18, 16:08
RE: Sports scraper - by n1md4 - 2014-07-21, 03:07
RE: Sports scraper - by Ovokx - 2014-07-21, 12:21
RE: Sports scraper - by zag - 2014-07-21, 12:40
RE: Sports scraper - by Ovokx - 2014-07-21, 21:54
RE: Sports scraper - by Intropy - 2014-08-23, 21:00
RE: Sports scraper - by Ovokx - 2014-08-24, 12:19
RE: Sports scraper - by Ovokx - 2014-12-31, 17:05
RE: Sports scraper - by n1md4 - 2014-07-23, 02:01
RE: Sports scraper - by Ovokx - 2014-08-08, 15:07
RE: Sports scraper - by Ovokx - 2014-08-22, 17:08
RE: Sports scraper - by enen92 - 2014-08-26, 16:37
RE: Sports scraper - by Ovokx - 2014-09-11, 12:12
RE: Sports scraper - by Ovokx - 2014-10-03, 16:11
RE: Sports scraper - by zag - 2014-10-12, 12:19
RE: Sports scraper - by boodahbellie - 2014-10-13, 15:12
RE: Sports scraper - by freddy12 - 2014-10-28, 07:11
RE: Sports scraper - by Ovokx - 2014-11-03, 18:59
RE: Sports scraper - by zag - 2014-12-21, 19:09
RE: Sports scraper - by Ovokx - 2014-12-31, 16:11
RE: Sports scraper - by bry - 2014-12-21, 20:14
RE: Sports scraper - by enen92 - 2014-12-22, 18:46
RE: Sports scraper - by zag - 2014-12-23, 17:51
RE: Sports scraper - by enen92 - 2014-12-23, 20:03
RE: Sports scraper - by n1md4 - 2015-01-14, 18:17
RE: Sports scraper - by karandras24 - 2014-12-23, 19:36
RE: Sports scraper - by zag - 2014-12-24, 18:10
RE: Sports scraper - by jahruze23 - 2014-12-26, 17:56
RE: Sports scraper - by Katapiro - 2014-12-27, 19:55
RE: Sports scraper - by karandras24 - 2014-12-29, 00:52
RE: Sports scraper - by john3voltas - 2014-12-28, 03:53
RE: Sports scraper - by john3voltas - 2015-01-02, 17:50
RE: Sports scraper - by zag - 2015-01-03, 03:10
RE: Sports scraper - by bry - 2015-01-03, 05:50
RE: Sports scraper - by Ovokx - 2015-01-04, 00:39
RE: Sports scraper - by zag - 2015-01-04, 14:31
RE: Sports scraper - by enen92 - 2015-01-04, 15:00
RE: Sports scraper - by enen92 - 2015-01-04, 15:11
RE: Sports scraper - by Ovokx - 2015-01-04, 15:18
RE: Sports scraper - by Ovokx - 2015-01-04, 16:01
RE: Sports scraper - by enen92 - 2015-01-04, 16:05
RE: Sports scraper - by Ovokx - 2015-01-04, 16:11
RE: Sports scraper - by Ovokx - 2015-01-04, 16:25
RE: Sports scraper - by zag - 2015-01-04, 19:26
RE: Sports scraper - by enen92 - 2015-01-04, 19:01
RE: Sports scraper - by enen92 - 2015-01-04, 19:31
RE: Sports scraper - by Ovokx - 2015-01-04, 19:49
RE: Sports scraper - by Ovokx - 2015-01-05, 00:14
RE: Sports scraper - by zag - 2015-01-05, 02:47
RE: Sports scraper - by zag - 2015-01-05, 15:29
RE: Sports scraper - by bry - 2015-01-05, 15:35
RE: Sports scraper - by bry - 2015-01-05, 16:03
RE: Sports scraper - by zag - 2015-01-05, 16:57
RE: Sports scraper - by enen92 - 2015-01-05, 18:33
RE: Sports scraper - by bry - 2015-01-05, 18:39
RE: Sports scraper - by bry - 2015-01-05, 18:54
RE: Sports scraper - by bry - 2015-01-12, 04:39
RE: Sports scraper - by Hazmat - 2015-01-05, 22:43
RE: Sports scraper - by enen92 - 2015-01-06, 20:24
RE: Sports scraper - by zag - 2015-01-07, 01:45
RE: Sports scraper - by Ovokx - 2015-01-07, 20:58
RE: Sports scraper - by el_Paraguayo - 2015-01-07, 21:06
RE: Sports scraper - by zag - 2015-01-08, 01:59
RE: Sports scraper - by enen92 - 2015-01-08, 05:16
RE: Sports scraper - by karandras24 - 2015-01-09, 16:51
RE: Sports scraper - by Ovokx - 2015-01-08, 20:27
RE: Sports scraper - by zag - 2015-01-08, 21:31
RE: Sports scraper - by enen92 - 2015-01-08, 22:31
RE: Sports scraper - by Hazmat - 2015-01-09, 09:19
RE: Sports scraper - by enen92 - 2015-01-09, 12:58
RE: Sports scraper - by zag - 2015-01-09, 13:26
RE: Sports scraper - by zag - 2015-01-09, 16:05
RE: Sports scraper - by enen92 - 2015-01-09, 17:04
RE: Sports scraper - by Hazmat - 2015-01-09, 20:05
RE: Sports scraper - by el_Paraguayo - 2015-01-10, 09:22
RE: Sports scraper - by zag - 2015-01-10, 11:51
RE: Sports scraper - by enen92 - 2015-01-10, 14:55
RE: Sports scraper - by zag - 2015-01-11, 14:37
RE: Sports scraper - by zag - 2015-01-11, 22:29
RE: Sports scraper - by Hazmat - 2015-01-12, 02:57
RE: Sports scraper - by RavRob - 2015-01-14, 16:27
RE: Sports scraper - by zag - 2015-01-14, 17:45
RE: Sports scraper - by enen92 - 2015-01-14, 18:04
RE: Sports scraper - by Ovokx - 2015-01-15, 20:20
RE: Sports scraper - by enen92 - 2015-01-16, 15:58
RE: Sports scraper - by enen92 - 2015-01-15, 02:38
RE: Sports scraper - by zag - 2015-01-15, 18:01
RE: Sports scraper - by zag - 2015-01-15, 20:28
RE: Sports scraper - by Ovokx - 2015-01-16, 00:17
Sports scraper - by cirkator - 2015-01-16, 08:56
RE: Sports scraper - by zag - 2015-01-16, 16:14
RE: Sports scraper - by enen92 - 2015-01-16, 17:45
RE: Sports scraper - by Ovokx - 2015-01-16, 18:16
RE: Sports scraper - by enen92 - 2015-01-16, 18:20
RE: Sports scraper - by Fisaidaid - 2015-01-16, 18:33
RE: Sports scraper - by zag - 2015-01-16, 20:12
RE: Sports scraper - by Ovokx - 2015-01-16, 20:36
RE: Sports scraper - by zag - 2015-01-16, 20:53
RE: Sports scraper - by Ovokx - 2015-01-16, 21:11
RE: Sports scraper - by zag - 2015-01-16, 21:47
RE: Sports scraper - by Ovokx - 2015-01-16, 22:41
RE: Sports scraper - by n1md4 - 2015-01-16, 21:49
RE: Sports scraper - by zag - 2015-01-17, 01:53
RE: Sports scraper - by n1md4 - 2015-01-17, 02:56
RE: Sports scraper - by LongMan - 2015-01-17, 03:26
RE: Sports scraper - by Ovokx - 2015-01-17, 15:22
RE: Sports scraper - by Ovokx - 2015-01-17, 16:44
RE: Sports scraper - by zag - 2015-01-17, 18:50
RE: Sports scraper - by bry - 2015-01-17, 19:30
RE: Sports scraper - by Ovokx - 2015-01-18, 18:25
RE: Sports scraper - by enen92 - 2015-01-18, 18:40
RE: Sports scraper - by zag - 2015-01-18, 19:48
RE: Sports scraper - by el_Paraguayo - 2015-01-19, 11:41
RE: Sports scraper - by Ovokx - 2015-01-18, 20:02
RE: Sports scraper - by zag - 2015-01-17, 20:28
RE: Sports scraper - by Ovokx - 2015-01-17, 21:05
RE: Sports scraper - by LongMan - 2015-01-17, 23:17
RE: Sports scraper - by thezoggy - 2015-01-18, 07:02
RE: Sports scraper - by zag - 2015-01-18, 16:27
RE: Sports scraper - by enen92 - 2015-01-18, 20:01
RE: Sports scraper - by zag - 2015-01-19, 11:41
RE: Sports scraper - by Ovokx - 2015-01-19, 22:18
RE: Sports scraper - by redglory - 2015-01-19, 18:32
RE: Sports scraper - by Ovokx - 2015-01-19, 19:34
RE: Sports scraper - by Ovokx - 2015-01-19, 20:10
RE: Sports scraper - by zag - 2015-01-19, 23:27
RE: Sports scraper - by Ovokx - 2015-01-19, 23:37
RE: Sports scraper - by enen92 - 2015-01-20, 00:11
RE: Sports scraper - by enen92 - 2015-01-20, 04:06
RE: Sports scraper - by Maniac - 2015-01-20, 20:03
RE: Sports scraper - by enen92 - 2015-01-20, 20:14
RE: Sports scraper - by schumi2004 - 2015-01-21, 16:11
RE: Sports scraper - by el_Paraguayo - 2015-01-20, 22:19
RE: Sports scraper - by Maniac - 2015-01-21, 16:03
RE: Sports scraper - by enen92 - 2015-01-20, 22:53
RE: Sports scraper - by zag - 2015-01-21, 13:32
RE: Sports scraper - by ziggy73701 - 2015-01-21, 13:53
RE: Sports scraper - by zag - 2015-01-21, 13:57
RE: Sports scraper - by zag - 2015-01-21, 17:01
RE: Sports scraper - by el_Paraguayo - 2015-01-22, 00:19
RE: Sports scraper - by zag - 2015-01-23, 11:27
RE: Sports scraper - by el_Paraguayo - 2015-01-23, 14:23
RE: Sports scraper - by enen92 - 2015-01-22, 01:58
RE: Sports scraper - by enen92 - 2015-01-23, 03:21
RE: Sports scraper - by enen92 - 2015-01-23, 14:37
RE: Sports scraper - by el_Paraguayo - 2015-01-23, 15:41
RE: Sports scraper - by zag - 2015-01-23, 16:59
RE: Sports scraper - by n1md4 - 2015-01-30, 02:45
RE: Sports scraper - by Hazmat - 2015-01-23, 17:59
RE: Sports scraper - by enen92 - 2015-01-23, 18:10
RE: Sports scraper - by Hazmat - 2015-01-23, 18:44
RE: Sports scraper - by enen92 - 2015-01-23, 19:08
RE: Sports scraper - by enen92 - 2015-01-24, 01:07
RE: Sports scraper - by el_Paraguayo - 2015-01-24, 15:20
RE: Sports scraper - by zag - 2015-01-28, 01:44
RE: Sports scraper - by enen92 - 2015-01-28, 03:02
RE: Sports scraper - by enen92 - 2015-01-28, 18:27
RE: Sports scraper - by zag - 2015-01-28, 18:38
RE: Sports scraper - by enen92 - 2015-01-28, 18:44
RE: Sports scraper - by enen92 - 2015-01-28, 18:50
RE: Sports scraper - by Ovokx - 2015-01-28, 19:18
RE: Sports scraper - by enen92 - 2015-01-28, 19:27
RE: Sports scraper - by Ovokx - 2015-01-28, 19:30
RE: Sports scraper - by enen92 - 2015-01-28, 21:35
RE: Sports scraper - by Ovokx - 2015-01-29, 19:53
RE: Sports scraper - by zag - 2015-01-29, 22:18
RE: Sports scraper - by enen92 - 2015-01-29, 22:55
RE: Sports scraper - by zag - 2015-02-03, 11:56
RE: Sports scraper - by zag - 2015-01-30, 00:31
RE: Sports scraper - by enen92 - 2015-01-30, 17:13
RE: Sports scraper - by Ovokx - 2015-01-30, 18:45
RE: Sports scraper - by zag - 2015-01-31, 11:54
RE: Sports scraper - by Ovokx - 2015-01-31, 12:16
RE: Sports scraper - by zag - 2015-01-31, 13:38
RE: Sports scraper - by Ovokx - 2015-01-31, 19:15
RE: Sports scraper - by Ovokx - 2015-01-31, 14:16
RE: Sports scraper - by Ovokx - 2015-02-01, 14:19
RE: Sports scraper - by enen92 - 2015-02-01, 15:47
RE: Sports scraper - by zag - 2015-02-03, 12:24
RE: Sports scraper - by zag - 2015-02-01, 16:22
RE: Sports scraper - by enen92 - 2015-02-01, 18:36
RE: Sports scraper - by enen92 - 2015-02-03, 17:32
RE: Sports scraper - by zag - 2015-02-05, 13:14
RE: Sports scraper - by Ovokx - 2015-02-05, 21:02
RE: Sports scraper - by Ovokx - 2015-02-24, 20:14
RE: Sports scraper - by Ovokx - 2015-03-24, 20:04
RE: Sports scraper - by enen92 - 2015-02-05, 21:20
RE: Sports scraper - by zag - 2015-02-06, 11:30
RE: Sports scraper - by Ovokx - 2015-02-05, 23:52
RE: Sports scraper - by enen92 - 2015-02-06, 19:53
RE: Sports scraper - by zag - 2015-02-06, 23:00
RE: Sports scraper - by Ovokx - 2015-02-07, 12:10
RE: Sports scraper - by zag - 2015-02-08, 13:22
RE: Sports scraper - by n1md4 - 2015-02-08, 19:09
RE: Sports scraper - by el_Paraguayo - 2015-02-09, 12:29
RE: Sports scraper - by enen92 - 2015-02-10, 05:39
RE: Sports scraper - by el_Paraguayo - 2015-02-10, 11:24
RE: Sports scraper - by zag - 2015-02-10, 11:59
RE: Sports scraper - by Ovokx - 2015-02-10, 20:20
RE: Sports scraper - by zag - 2015-02-11, 16:19
RE: Sports scraper - by Ovokx - 2015-02-11, 21:29
RE: Sports scraper - by Ovokx - 2015-02-11, 22:03
RE: Sports scraper - by zag - 2015-02-12, 12:39
Sports scraper - by cirkator - 2015-02-10, 22:43
RE: Sports scraper - by zag - 2015-02-11, 16:20
RE: Sports scraper - by cirkator - 2015-02-11, 21:33
RE: Sports scraper - by zag - 2015-02-11, 16:24
RE: Sports scraper - by Ovokx - 2015-02-11, 20:33
RE: Sports scraper - by enen92 - 2015-02-11, 18:17
RE: Sports scraper - by Ovokx - 2015-02-14, 11:48
RE: Sports scraper - by enen92 - 2015-02-18, 17:18
RE: Sports scraper - by bry - 2015-02-18, 17:29
RE: Sports scraper - by enen92 - 2015-02-18, 17:41
RE: Sports scraper - by boodahbellie - 2015-02-18, 19:37
RE: Sports scraper - by Ovokx - 2015-02-19, 19:41
RE: Sports scraper - by enen92 - 2015-02-19, 20:50
RE: Sports scraper - by Ovokx - 2015-02-19, 21:09
RE: Sports scraper - by zag - 2015-02-19, 21:19
RE: Sports scraper - by Ovokx - 2015-02-19, 21:35
RE: Sports scraper - by enen92 - 2015-02-19, 23:52
RE: Sports scraper - by Ovokx - 2015-02-24, 20:37
RE: Sports scraper - by zag - 2015-03-02, 17:00
RE: Sports scraper - by Ovokx - 2015-03-03, 07:26
RE: Sports scraper - by Jahandar - 2015-08-26, 09:50
RE: Sports scraper - by enen92 - 2015-03-03, 02:48
RE: Sports scraper - by Ovokx - 2015-03-18, 07:54
RE: Sports scraper - by zag - 2015-03-26, 00:46
RE: Sports scraper - by freddy12 - 2015-04-18, 12:46
RE: Sports scraper - by mjccox - 2015-04-18, 16:12
RE: Sports scraper - by alienbiker99 - 2015-04-20, 07:43
RE: Sports scraper - by enen92 - 2015-04-26, 16:51
RE: Sports scraper - by Ovokx - 2015-04-26, 17:31
RE: Sports scraper - by zag - 2015-04-27, 17:09
RE: Sports scraper - by enen92 - 2015-04-26, 17:36
RE: Sports scraper - by enen92 - 2015-04-27, 17:13
RE: Sports scraper - by ShepsCrook - 2015-04-29, 15:43
RE: Sports scraper - by zag - 2015-04-29, 15:48
RE: Sports scraper - by ShepsCrook - 2015-04-29, 16:54
RE: Sports scraper - by enen92 - 2015-04-29, 16:57
RE: Sports scraper - by ShepsCrook - 2015-04-29, 17:05
RE: Sports scraper - by zag - 2015-04-30, 14:15
RE: Sports scraper - by Ovokx - 2015-05-05, 19:22
RE: Sports scraper - by zag - 2015-05-13, 19:44
RE: Sports scraper - by enen92 - 2015-05-05, 23:28
RE: Sports scraper - by zag - 2015-05-13, 18:29
RE: Sports scraper - by Ovokx - 2015-05-13, 18:42
RE: Sports scraper - by zag - 2015-05-13, 19:47
RE: Sports scraper - by Ovokx - 2015-05-13, 19:51
RE: Sports scraper - by enen92 - 2015-05-14, 05:23
RE: Sports scraper - by zag - 2015-05-14, 10:04
RE: Sports scraper - by enen92 - 2015-05-14, 16:30
RE: Sports scraper - by enen92 - 2015-05-14, 17:27
RE: Sports scraper - by zag - 2015-05-14, 21:24
RE: Sports scraper - by zag - 2015-05-22, 17:04
RE: Sports scraper - by n1md4 - 2015-05-22, 18:38
RE: Sports scraper - by zag - 2015-05-22, 18:47
RE: Sports scraper - by n1md4 - 2015-05-23, 03:32
RE: Sports scraper - by Heyfrank - 2015-07-25, 02:31
RE: Sports scraper - by zag - 2015-07-27, 14:44
RE: Sports scraper - by n1md4 - 2015-08-26, 11:43
RE: Sports scraper - by mmullally - 2015-07-29, 05:04
RE: Sports scraper - by Kevo - 2015-09-21, 10:42
RE: Sports scraper - by Loewkie - 2015-08-08, 00:53
RE: Sports scraper - by n1md4 - 2015-09-08, 01:50
RE: Sports scraper - by zag - 2015-09-08, 09:48
RE: Sports scraper - by zag - 2015-09-08, 11:52
RE: Sports scraper - by zag - 2015-09-11, 16:06
RE: Sports scraper - by zag - 2015-10-05, 13:13
RE: Sports scraper - by bsoriano - 2015-10-05, 15:32
RE: Sports scraper - by zag - 2015-10-06, 10:31
Sports scraper - by sattekop - 2015-10-07, 04:20
RE: Sports scraper - by zag - 2015-11-11, 23:33
RE: Sports scraper - by enen92 - 2015-11-11, 23:40
RE: Sports scraper - by zag - 2015-11-12, 16:08
RE: Sports scraper - by peter0123 - 2015-12-17, 15:07
RE: Sports scraper - by n1md4 - 2015-12-17, 15:38
RE: Sports scraper - by bsoriano - 2015-12-17, 16:12
RE: Sports scraper - by enen92 - 2015-12-17, 20:36
RE: Sports scraper - by peter0123 - 2015-12-20, 17:47
RE: Sports scraper - by n1md4 - 2016-01-12, 19:07
RE: Sports scraper - by zag - 2016-01-12, 20:50
RE: Sports scraper - by n1md4 - 2016-01-13, 02:35
RE: Sports scraper - by zag - 2016-01-13, 11:20
RE: Sports scraper - by Mitico - 2016-09-24, 18:37
RE: Sports scraper - by Ovokx - 2016-09-25, 11:36
RE: Sports scraper - by n1md4 - 2017-01-28, 02:33
RE: Sports scraper - by Ovokx - 2017-01-28, 16:12
RE: Sports scraper - by docwra - 2017-02-17, 14:20


Logout Mark Read Team Forum Stats Members Help
Sports scraper1
This forum uses Lukasz Tkacz MyBB addons.