Kodi Community Forum
Req Sports scraper - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Information Providers (scrapers) (https://forum.kodi.tv/forumdisplay.php?fid=147)
+----- Forum: General Scraping (https://forum.kodi.tv/forumdisplay.php?fid=306)
+----- Thread: Req Sports scraper (/showthread.php?tid=174789)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23


RE: Sports scraper - zag - 2015-01-30

Thank, nice find. Will have a look tomorrow at the Arsenal one and the extra api method you wanted.

A little progress today as I managed to import the player manager transparent PNG images for a fair few players from a massive text file Wink

- Player Cutout Images (transparent football manager)
- Playermanager ID's stored in the DB now
- strCutout and idPlayerManager available in the API

Example
http://www.thesportsdb.com/player/34145910

NOTE: All player images might take a few days to copy as there are 9gb of them! Smile


RE: Sports scraper - n1md4 - 2015-01-30

(2015-01-23, 16:59)zag Wrote: - script-fu
- outer glow
- make it light grey
- make it 2 or 4 pixels wide (depending on your image size)
- Reduce the opacity a little to about 60%

I didn't have Outer-Glow, alternatively I found Drop-Shadow. I used the following settings to get the clearart logo to match the badge, reasonably well:-

- filters
- light and shadow
- drop shadow
- x = 4 y = 4
- blur radius = 15
- colour #525252
- 80% opacity

Image

Image

P.S. wanted to make the images smaller, but couldn't immediately see how... and it's a school night! Peace out!


RE: Sports scraper - enen92 - 2015-01-30

Posted some news here: http://forum.kodi.tv/showthread.php?tid=216044&pid=1909233#pid1909233


RE: Sports scraper - Ovokx - 2015-01-30

Full NBA regular season schedule added to the "Event additions" sheet


PS: Is it possible to add past events with results using this sheet?


RE: Sports scraper - zag - 2015-01-31

Yep past events is fine as well. You could even add the home and away score to 2 new columns if wanted (but not essential)

Thanks!


RE: Sports scraper - Ovokx - 2015-01-31

Great! How do you want them to be entered? New columns for home team result & away team result or only one column for the final result?


RE: Sports scraper - zag - 2015-01-31

2 new columns please


RE: Sports scraper - Ovokx - 2015-01-31

I have checked and corrected all players pending to be imported in order to keep them ready to upload Wink

While doing this, I have found some duplicates in players DB:

Markus Rosenberg: ID 34156727 & ID 34157108
Guillermo Molins: ID 34156728 & 34157109


RE: Sports scraper - Ovokx - 2015-01-31

(2015-01-31, 13:38)zag Wrote: 2 new columns please

OK, done! Added full Liga ACB Events Smile


RE: Sports scraper - Ovokx - 2015-02-01

Here's a list of features related to events that should be added:

- Edition: Actually we have some events duplicated (see 448834 & 443781) or without results/attendance (see same ID events) which would be great to be modified directly by the users in order to speed up the process
- Thumbs: I think that enen92 will love this in order to include it to his add-on
- Event page: A place to see/sumarise all the incoming events of any sport with an option to filter by sports and/or leagues
- Events at leagues: Display coming & past events in the same way that currently at team level, but now on league pages
- Table leagues


RE: Sports scraper - enen92 - 2015-02-01

Events at leagues are already implemented and can be grabbed from the api. Next events only, past events zag said that he would implement them soon.
Event thumbs is cool, I was thinking, if there is not a better alternative, about using a generic thumb like a race flag:

Image followed by the event name on the same type of dialog:

Image

Something that I consider fundamental is the event timming (hour) that I don't know if it is available at all on the api


RE: Sports scraper - zag - 2015-02-01

OK I've done a few of those things:

- EventsPastLeague API method
- Fixed duplicate events
- Scheduled event update once a day for top Soccer leagues
- Imported NBA schedule (thx Ovokx)
- Event import now updates date of match if its changed for some reason

Match times (hour) is quite complicated as they sometimes change for TV so will have a look at that in the future.

I like the idea of event images, thats something the motorsport guys have asked for as well.

Player Date of Birth I am also working on but again is complicated with all the different date formats out there.


RE: Sports scraper - enen92 - 2015-02-01

You've a small typo error (double t) in the forum post/api tutorial:

Last 15 Events by League Id
thesportsdb.com/api/v1/json/{APIKEY}/eventspasttleague.php?id={leagueid}

http://www.thesportsdb.com/api/v1/json/1/eventspastleague.php?id=4328


RE: Sports scraper - zag - 2015-02-03

(2015-01-29, 22:55)enen92 Wrote: A bug I just found:

If you call: thesportsdb.Schedules().eventsnextleague(4406) -> Argentina League; and check the events there is a team there (arsenal de tulia) that is matched to Arsenal (uk):

Quote:{u'strAwayRedCards': None, u'idAwayTeam': u'135160', u'strAwayTeam': u'Estudiantes', u'dateEvent': u'2015-02-15', u'intAwayScore': None, u'intSpectators': None, u'intHomeScore': None, u'strRaceCountry': None, u'strEvent': u'Arsenal Estudiantes', u'intRound': None, u'strTVStation': None, u'idLeague': u'4406', u'strHomeRedCards': None, u'strAwayGoalDetails': None, u'strHomeYellowCards': None, u'strRaceCircuit': None, u'idSoccerXML': None, u'strHomeTeam': u'Arsenal', u'strDate': None, u'strHomeGoalDetails': None, u'intHomeShots': None, u'strSeason': u'2015', u'strSport': u'Soccer', u'intAwayShots': None, u'idEvent': u'450122', u'strAwayYellowCards': None, u'strLeague': u'Argentinian Primera Divisi\xf3n', u'strRaceLocality': None, u'idHomeTeam': u'133604'}

Team with ID 133604 is Arsenal UK: http://www.thesportsdb.com/api/v1/json/1/lookupteam.php?id=133604

Cheers

Should be fixed now!

Who would have known there are 4 teams around the world called Arsenal Big Grin


RE: Sports scraper - zag - 2015-02-03

(2015-02-01, 15:47)enen92 Wrote: Something that I consider fundamental is the event timming (hour) that I don't know if it is available at all on the api

Yep, agreed, I have the time but I cant work out how to convert it to something useful.

This is the string I get from the API

2015-01-10T04:45:00-08:00

The date is easy but any ideas how to convert the time to something meaningful time in PHP?