emilioi Posted July 17, 2012 Share Posted July 17, 2012 Hello, Recently NFl.com has changed their website so now my site will not update to get me the new schedule for 2012. They used to have a drop down but have now changed it by clicking on numberof the weeks. If I were to give you the page of my code could you help me out by telling me what needs to be changed??? Please I really need this ..... this is the error that it gives me Parse Error Unfortunately, http://www.nfl.com/schedules/2012/REG1 has changed. Please contact emilio and cite page /admin/build_nfl_regular_season_schedule.php with error cannot find newest season year value container <select id="seasonDropdown"> Thanks 18678_.php Quote Link to comment https://forums.phpfreaks.com/topic/265837-need-help-with-parsing-an-nfl-schedule/ Share on other sites More sharing options...
ignace Posted July 17, 2012 Share Posted July 17, 2012 You need to find all instances in the code like: select[id=seasonDropdown] All of these needs to be changed so that it matches the expected text. To give you an example: $year = trim($schedule->find('ul[class=schedules-nav-dropdown-item-content-ul]', 0)->find('li', 0)->innertext); Would give you the first year in the year dropdown for the new layout. Not tested. Quote Link to comment https://forums.phpfreaks.com/topic/265837-need-help-with-parsing-an-nfl-schedule/#findComment-1362200 Share on other sites More sharing options...
ignace Posted July 17, 2012 Share Posted July 17, 2012 Unfortunately, http://www.nfl.com/schedules/2012/REG1 has changed. Please contact emilio and cite page /admin/build_nfl_regular_season_schedule.php with error cannot find newest season year value container <select id="seasonDropdown"> So why don't you? Quote Link to comment https://forums.phpfreaks.com/topic/265837-need-help-with-parsing-an-nfl-schedule/#findComment-1362203 Share on other sites More sharing options...
emilioi Posted July 17, 2012 Author Share Posted July 17, 2012 Quote Unfortunately, http://www.nfl.com/schedules/2012/REG1 has changed. Please contact emilio and cite page /admin/build_nfl_regular_season_schedule.php with error cannot find newest season year value container <select id="seasonDropdown"> So why don't you? Because that is my email address..... I appreciate your help...So can i insert that code that you gave me inot my code and test it? Quote Link to comment https://forums.phpfreaks.com/topic/265837-need-help-with-parsing-an-nfl-schedule/#findComment-1362205 Share on other sites More sharing options...
emilioi Posted July 17, 2012 Author Share Posted July 17, 2012 so just this has to be changed >> select[id=seasonDropdown] to >> $year = trim($schedule->find('ul[class=schedules-nav-dropdown-item-content-ul]', 0)->find('li', 0)->innertext); Quote Link to comment https://forums.phpfreaks.com/topic/265837-need-help-with-parsing-an-nfl-schedule/#findComment-1362206 Share on other sites More sharing options...
ignace Posted July 17, 2012 Share Posted July 17, 2012 Can't you just contact the person who wrote this script for you? Maybe he already has an updated version? I appreciate your help...So can i insert that code that you gave me inot my code and test it? Yes, but 1) create a backup first 2) you have to replace ALL instances where they try to retrieve information from the website, which means you'll need some tools which can be found by pressing F12 in Firefox or Chrome to get the developer console. Quote Link to comment https://forums.phpfreaks.com/topic/265837-need-help-with-parsing-an-nfl-schedule/#findComment-1362207 Share on other sites More sharing options...
ignace Posted July 17, 2012 Share Posted July 17, 2012 >> select[id=seasonDropdown] to >> $year = trim($schedule->find('ul[class=schedules-nav-dropdown-item-content-ul]', 0)->find('li', 0)->innertext); Obviously I refer to the entire line 91: $year = trim($schedule->find('select[id=seasonDropdown]', 0)->find('option', 0)->innertext); Must be replaced with above mentioned code. Quote Link to comment https://forums.phpfreaks.com/topic/265837-need-help-with-parsing-an-nfl-schedule/#findComment-1362208 Share on other sites More sharing options...
emilioi Posted July 17, 2012 Author Share Posted July 17, 2012 No that person is long gone..... so this * <select id="season"> structure integrity detection. */ if (count($schedule->find('select[id=seasonDropdown]', 0)) == 0) { nfl_site_changed("cannot find newest season year value container <select id=\"seasonDropdown\">"); } becomes this * <select id="season"> structure integrity detection. */ if (count($schedule->find('$year = trim($schedule->find('ul[class=schedules-nav-dropdown-item-content-ul]', 0)->find('li', 0)->innertext); } Quote Link to comment https://forums.phpfreaks.com/topic/265837-need-help-with-parsing-an-nfl-schedule/#findComment-1362209 Share on other sites More sharing options...
ignace Posted July 17, 2012 Share Posted July 17, 2012 Obviously I refer to the entire line 91: $year = trim($schedule->find('select[id=seasonDropdown]', 0)->find('option', 0)->innertext); Must be replaced with above mentioned code. If you feel uncomfortable making these changes then you can always head on over to the freelancing section and let someone make these changes for you. Quote Link to comment https://forums.phpfreaks.com/topic/265837-need-help-with-parsing-an-nfl-schedule/#findComment-1362213 Share on other sites More sharing options...
emilioi Posted July 17, 2012 Author Share Posted July 17, 2012 I just inserted the code it did not work..... Could you change it for me...what would you charge? Quote Link to comment https://forums.phpfreaks.com/topic/265837-need-help-with-parsing-an-nfl-schedule/#findComment-1362215 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.