[Plex Add-on] Sports Scraper |
Posted: 21 Nov 2022 19:52 | |||
Posts: 4 Joined: 2022-10-21 | edit: Finally solved and I am so glad! You can completely ignore "Download the latest release from https://github.com/mmmmmtasty/SportScanner/releases" that is in the readme on the github. Instead go to code -> download as zip and you will get the latest files with the obfuscated API key url thingy and metadata will get pulled ####################################################################################### Still trying to get this working. I am almost certain that we can rule out folder structure and filenaming in my case. Below is what I have done, step by step. 1. Shutdown plex. 2. Downloaded https://github.com/mmmmmtasty/SportScanner/archive/refs/tags/v0.2.zip 3. Unzipped the archive. 4. Moved scanners directory to %localappdata%\Plex Media Server 5. Moved Sportscanner.bundle directory to %localappdata%\Plex Media Server\Plug-ins 6. Launched plex media server. 7. Created a library "TV - Sports" with the settings below library root = X:\mnt\share\tv-sports scanner = sportscanner agent = sportscanner 8. Downloaded https://thesportsdb.com/sports_fake_video_files.zip and unzipped in the library root (X:\mnt\share\tv-sports) folder. Complete folder structure and filenaming here = https://pastecode.io/s/dwvyemn0 9. No metadata pulled. 10. In the log file %localappdata%\Plex Media Server\Logs\PMS Plugin Logs\com.plexapp.agents.sportscanner.log I see errors two examples below for "English Premier League" and "Boxing". Same for every object it tries to match. complete log here = https://pastecode.io/s/opm5j0vv ########################################## 2022-11-21 20:23:47,578 (4d5c) : INFO (logkit:16) - SS: Attempting to match English Premier League 2022-11-21 20:23:47,578 (4d5c) : DEBUG (networking:143) - Requesting 'https://www.thesportsdb.com/api/v1/json/8123456712556/all_leagues.php' 2022-11-21 20:23:47,786 (4d5c) : ERROR (networking:196) - Error opening URL 'https://www.thesportsdb.com/api/v1/json/8123456712556/all_leagues.php' 2022-11-21 20:23:47,786 (4d5c) : INFO (logkit:16) - SS: Could not retrieve shows from thesportsdb.com 2022-11-21 20:23:47,788 (4d5c) : CRITICAL (core:574) - Exception in the search function of agent named 'SportScanner', called with keyword arguments {'openSubtitlesHash': None, 'episode': '2108213915', 'name': 'Aston Villa vs Newcastle', 'episodic': '1', 'show': 'English Premier League', 'released_at': '2021-08-21', 'season': '2021', 'plexHash': '11f63321c4aacd7549c75ab36e19716f3bac280bf5', 'filename': 'X%3A%5Cmnt%5Cshare%5Ctv-sports%5CEnglish%20Premier%20League%5C2021-2022%5CEnglish%2EPremier%2ELeague%2E2021-08-21%2EAston%2EVilla%2Evs%2ENewcastle%2Emp4', 'year': '2021', 'duration': '-1', 'id': '125587'} (most recent call last): File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-6d72b0cf6\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1011, in _search agent.search(*f_args, **f_kwargs) File "C:\Users\user\AppData\Local\Plex Media Server\Plug-ins\SportScanner.bundle\Contents\Code\__init__.py", line 104, in search if potential_leagues is not None: UnboundLocalError: local variable 'potential_leagues' referenced before assignment ########################################## ########################################## 2022-11-21 20:23:47,313 (5e8c) : INFO (logkit:16) - SS: Attempting to match Boxing 2022-11-21 20:23:47,315 (5e8c) : DEBUG (networking:143) - Requesting 'https://www.thesportsdb.com/api/v1/json/8123456712556/all_leagues.php' 2022-11-21 20:23:47,532 (5e8c) : ERROR (networking:196) - Error opening URL 'https://www.thesportsdb.com/api/v1/json/8123456712556/all_leagues.php' 2022-11-21 20:23:47,532 (5e8c) : INFO (logkit:16) - SS: Could not retrieve shows from thesportsdb.com 2022-11-21 20:23:47,533 (5e8c) : CRITICAL (core:574) - Exception in the search function of agent named 'SportScanner', called with keyword arguments {'openSubtitlesHash': None, 'name': 'Tyson Fury vs Dillian Whyte', 'episodic': '1', 'show': 'Boxing', 'released_at': '2022-04-23', 'season': '2022', 'plexHash': '15d059774e1c58b5702f748d53be620a589b2084e3', 'filename': 'X%3A%5Cmnt%5Cshare%5Ctv-sports%5CBoxing%5C2022%5CBoxing%2E2022-04-23%2ETyson%2EFury%2Evs%2EDillian%2EWhyte%2Emkv', 'year': '2022', 'duration': '-1', 'id': '125600'} (most recent call last): File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-6d72b0cf6\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1011, in _search agent.search(*f_args, **f_kwargs) File "C:\Users\user\AppData\Local\Plex Media Server\Plug-ins\SportScanner.bundle\Contents\Code\__init__.py", line 104, in search if potential_leagues is not None: UnboundLocalError: local variable 'potential_leagues' referenced before assignment ########################################## 11. "2022-11-21 20:23:47,532 (5e8c) : ERROR (networking:196) - Error opening URL 'https://www.thesportsdb.com/api/v1/json/8123456712556/all_leagues.php'" wrong url? Should it not be using https://www.thesportsdb.com/api/v1/json/2/all_leagues.php which is listed under https://www.thesportsdb.com/api.php? 12. On line 17 in %localappdata%\Plex Media Server\Plug-ins\SportScanner.bundle\Contents\Code\__init__.py below is set. SPORTSDB_API = "https://www.thesportsdb.com/api/v1/json/8123456712556/" Is this correct? Link just gives 404 error. CatPhish, Retrorat1, PeterPiglet | ||
![]() | |||
Posted: 07 Jan 2023 12:23 | |||
Posts: 32 Joined: 2020-06-25 | Thanks to @rednoah in the filebot forum I have finally got the EPL sorted so I don't have to keep renaming them after downloading. most files have this format EPL 2012 Arsenal vs Newcastle Utd 29 12 720pEN60fps USA so using the setup file from this post https://www.filebot.net/forums/viewtopic.php?f=4&t=13517&p=59047#p59047 with a line filebot @/home/terrymasu/torrents/rtorrent/Sports/args.txt all 15 files were renamed and transferred to their folders. now going to try and work on a format for my f1 1978-2011 zag | ||
![]() | |||
Posted: 12 Jan 2023 21:24 | |||
Posts: 20 Joined: 2022-02-08 | Hi, is anyone experiencing any issues when refreshing metadata via the sports scraper, that it sometimes takes forever to retrieve metadata, or it never finishes, if there are a lot records. This has been happening, the last 10 days, so I was curious if anyone is having a similar issue. The data is on a QNAP NAS running on an Intel Celeron processor. Any guidance, or answers would be appreciated. Thank you in advance | ||
![]() | |||
Posted: 16 Jan 2023 07:36 | |||
Posts: 32 Joined: 2020-06-25 | is anyone experiencing any issues when refreshing metadata via the sports scraper, that it sometimes takes forever to retrieve metadata, or it never finishes, if there are a lot records. This has been happening, the last 10 days, so I was curious if anyone is having a similar issue. The data is on a QNAP NAS running on an Intel Celeron processor. Any guidance, or answers would be appreciated. Thank you in advance Yes seeing the same behaviour, takes sometime 6-7 hours for it to show up. not seen this before just noticed it the past week. Not really bothered as it shows up in the end but yes looks like something has changed over the past week/10 days. | ||
![]() | |||
Posted: 17 Jan 2023 10:39 | |||
![]() zag Posts: 3,210 Joined: 2020-03-23 | Site should be fast again now after I changed the free API key again to stop abuse. Let me know if it makes a difference. | ||
![]() | |||
Posted: 20 Jan 2023 07:42 | |||
Posts: 32 Joined: 2020-06-25 | Yes that worked m8. zag | ||
![]() | |||
Posted: 23 Jan 2023 07:43 | |||
Posts: 32 Joined: 2020-06-25 | Has something changed again? Its stopped pulling data again from yesterday. 22-01-23/ Thanks | ||
![]() | |||
Posted: 04 Feb 2023 18:48 | |||
Posts: 4 Joined: 2022-08-20 | Does anyone have any clue why in my Plex, the 2021-22 season of English Premier League matches has the matches that were played in 2021 with Episode numbers while the 2022 matches have listed dates? For example, /Sports/Football/English Premier League/Season 2122/English.Premier.League.2021-10-18.Arsenal.vs.Crystal.Palace.mp4 has a listed Episode number like this: Episode 2110188806 while /Sports/Football/English Premier League/Season 2122/English.Premier.League.2022-01-23.Arsenal.vs.Burnley.mp4 is listed with a date like this: 1/23/22 It's this way for all of the matches in this season, split by the year they were played in, and they are all out of order because of it, with the 2022 matches being listed first and the 2021 matches after them. And it's only that season, the other seasons I have are organized fine. The 2022-23 season all has listed dates but they are in order, while all previous seasons have the Episode numbers. I checked the file names for all of my matches, and they are all correct to what is stated on each match's page here on SportsDB. Any help to get this season organized would be appreciated. | ||
![]() | |||
Posted: 13 Feb 2023 16:23 | |||
Posts: 1 Joined: 2023-02-13 | You can completely ignore "Download the latest release from https://github.com/mmmmmtasty/SportScanner/releases" that is in the readme on the github. Instead go to code -> download as zip and you will get the latest files with the obfuscated API key url thingy and metadata will get pulled ####################################################################################### Thank you! I was going insane, because I saw errors, which should have already been fixed. Downloading the current files helped at lot :-D | ||
![]() | |||
Posted: 14 Mar 2023 15:36 | |||
Posts: 4 Joined: 2022-08-20 | I have been importing NHL content into my Plex, and the same issue is happening to my 2021-22 season content there as is happening below, with the events that took place in 2022 being listed before 2021 events. Metadata is being pulled and everything, they're just out of order. NHL content is in a folder /Sports/NHL/Season 2122/ with all files named exactly as how this website suggests they should be. The Episode numbers are now all reading as like Episode 23110188806 instead of dates. But I cannot work out how to get them into the right order. Can anyone help me? For example, /Sports/Football/English Premier League/Season 2122/English.Premier.League.2021-10-18.Arsenal.vs.Crystal.Palace.mp4 has a listed Episode number like this: Episode 2110188806 while /Sports/Football/English Premier League/Season 2122/English.Premier.League.2022-01-23.Arsenal.vs.Burnley.mp4 is listed with a date like this: 1/23/22 It's this way for all of the matches in this season, split by the year they were played in, and they are all out of order because of it, with the 2022 matches being listed first and the 2021 matches after them. And it's only that season, the other seasons I have are organized fine. The 2022-23 season all has listed dates but they are in order, while all previous seasons have the Episode numbers. I checked the file names for all of my matches, and they are all correct to what is stated on each match's page here on SportsDB. Any help to get this season organized would be appreciated. | ||
![]() | |||
Posted: 11 May 2023 13:39 | |||
Posts: 6 Joined: 2022-09-18 | In Plex, if you use the numbers in your "Sort Title," that will be how the games get sorted. You can then change the title to be anything you want it to be. | ||
![]() | |||
Posted: 31 May 2023 05:08 | |||
Posts: 4 Joined: 2022-08-20 | Thank you. | ||
![]() | |||
Posted: 17 Jun 2023 04:28 | |||
Posts: 4 Joined: 2022-08-20 | I've tried this and it's still not working. My 2021-22 seasons are still not in order. I reinstalled the plugin and now everything has an episode number like Episode 2110236963 instead of some having dates, but it's still displaying matches from 2022 ahead of matches from 2021 even though I have it set to display Oldest first. Library default doesn't change this, and Newest first puts the 2021 matches first, but reverses them so the first 2021 match is the last one before it switches to 2022. My temporary workaround for this has been to create a collection just for that particular season so I can manually get them in order, but I'd much prefer not to have to do that. Can anyone advise on what to do? | ||
![]() | |||
Posted: 17 Jun 2023 09:32 | |||
![]() Ovokx Posts: 1,654 Joined: 2020-06-17 | Please join our Discord community. There's a special section for Plex users and maybe there you can get some help | ||
![]() | |||
Posted: 03 Jul 2023 20:10 | |||
Posts: 20 Joined: 2022-02-08 | Hi, I have asked this back in January, and due to reorganizing different things, have not been able to spend time on this. Now I am ready to start re building all of my sports libraries, and this is the same issue. It seems like something changed, around the December or January time frame, and everything is real slow, or it never comes back. I have thousands of sports events, and everything was working fine up until December 2022. Now I have looked at the log files, and trying to build a very simple league of 58 games, and tried to build this last night, and after about 10 hours, it never really finished, and I ended up stopping it. I have looked at the log file, and I am getting the following issue when it basically hangs: 2023-07-03 22:27:21,947 (3ffb0fefab0) : DEBUG (networking:143) - Requesting 'https://127.0.0.1:32400/library/metadata/135/tree' 2023-07-03 22:27:21,996 (3ffb0fefab0) : INFO (__init__:94) - SS: Attempting to match Belgian First Divison A 2023-07-03 22:27:21,997 (3ffb0fefab0) : DEBUG (networking:143) - Requesting 'https://www.thesportsdb.com/api/v1/json/8123456712556/all_leagues.php' 2023-07-03 22:27:22,309 (3ffb0fefab0) : ERROR (networking:196) - Error opening URL 'https://www.thesportsdb.com/api/v1/json/8123456712556/all_leagues.php' 2023-07-03 22:27:22,310 (3ffb0fefab0) : INFO (__init__:99) - SS: Could not retrieve shows from thesportsdb.com 2023-07-03 22:27:22,312 (3ffb0fefab0) : CRITICAL (agentkit:1018) - Exception in the search function of agent named 'SportScanner', called with keyword arguments {'openSubtitlesHash': '1e7394a287308273', 'episode': '2208140687', 'name': 'St Truiden vs Anderlecht', 'episodic': '1', 'show': 'Belgian First Divison A', 'released_at': '2022-08-14', 'season': '2223', 'plexHash': '831f9c9a4a3380c18b4176c660698f9396361345', 'filename': '%2Fshare%2FCACHEDEV1_DATA%2FSoccer%2FBelgian%20Soccer%2FBelgian%20First%20Divison%20A%2FSeason%202223%2FBelgian%2EFirst%2EDivision%2EA%2E%2E2022-08-14%2ESt%2ETruiden%2Evs%2EAnderlecht%2Emp4', 'year': '2022', 'duration': '-1', 'id': '135'} (most recent call last): File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Plug-ins-5070ad484/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1011, in _search agent.search(*f_args, **f_kwargs) File "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-ins/SportScanner.bundle/Contents/Code/__init__.py", line 104, in search if potential_leagues is not None: UnboundLocalError: local variable 'potential_leagues' referenced before assignment It seems like it cannot find the URL of all leagues in the sportsdb. This is the standard code from the site, that I have re downloaded with no changes, to make sure that this is the code that everyone else is using. Can someone please help? Has something changed since January, that I need to make a change to get this to work as before. Any help, would be really appreciated. | ||
![]() | |||
Posted: 20 Nov 2023 00:23 | |||
Posts: 1 Joined: 2023-11-20 | '' UnboundLocalError: local variable 'potential_leagues' referenced before assignment '' I get this exact error after hours of troubleshooting. Glad to see I am not the only one. Would love to help solve this problem, although I am not very experienced in this programming language. | ||
![]() |
Who is Online? In total there are 68 users online :: 3 registered, 0 hidden and 65 guests (based on users active over the past 5 minutes) Most users ever online was 424 on Fri Nov 10, 2017 9:02 pm | About Us Discussion forum for TheSportsDB.com site and related topics | Rules - Be Polite - Respect other users - Always post log files with issues - Try to be helpful - No Piracy discussion |