Page 1 of 1

Escapist (including Zero Punctuation)

PostPosted: Sat Jan 14, 2012 4:18 am
by mike_metro
Escapist magazine plugin.
Must be configure as a Web Resource.
Sample URL (Zero Punctuation): http://www.escapistmagazine.com/rss/videos/list/1.xml
other feeds can be found here: http://www.escapistmagazine.com/rss/

Update(s):
Version 2.0 - Fix to date parsing error
Version 3.0 - Added user agent when retrieving video settings json

Re: Escapist (including Zero Punctuation)

PostPosted: Sat Jan 14, 2012 1:22 pm
by WildRushSykes
Can anyone else confirm this is working for them?

Re: Escapist (including Zero Punctuation)

PostPosted: Mon Feb 06, 2012 3:16 pm
by J K Kubius
Doesn't work for me. I'm using Serviio 0.6.2, plugin set up as webresource.
Log:
2012-02-06 16:12:39,457 WARN [FeedUpdaterThread] An error occured while scanning for online item information, will continue
java.io.IOException: Unexpected error while invoking plugin (Escapist): Unparseable date: "Wed, 01 Feb 2012 22:00:00 GMT"
at org.serviio.library.online.WebResourceParser.parse(WebResourceParser.java:58)...

Re: Escapist (including Zero Punctuation)

PostPosted: Tue Feb 07, 2012 3:58 am
by mike_metro
Odd. I'm not getting any errors with this. The date in the error message seems to follow the format I am parsing. I even tested it in Groovy console. I'll take a look this week.

Re: Escapist (including Zero Punctuation)

PostPosted: Tue Feb 07, 2012 6:33 pm
by J K Kubius
I forgot to mention i'm using http://www.escapistmagazine.com/rss/videos/list/1.xml from 1. post as source URL.
Since you can't reproduce error yourself, here is full log:

  Code:
2012-02-07 19:25:15,513 WARN  [FeedUpdaterThread] An error occured while scanning for online item information, will continue
java.io.IOException: Unexpected error while invoking plugin (Escapist): Unparseable date: "Wed, 01 Feb 2012 22:00:00 GMT"
   at org.serviio.library.online.WebResourceParser.parse(WebResourceParser.java:58)
   at org.serviio.library.online.OnlineLibraryManager.findResource(OnlineLibraryManager.java:169)
   at org.serviio.library.online.OnlineLibraryManager.findResourceInCacheOrParse(OnlineLibraryManager.java:184)
   at org.serviio.library.online.metadata.FeedUpdaterThread.getOnlineItems(FeedUpdaterThread.java:158)
   at org.serviio.library.online.metadata.FeedUpdaterThread.run(FeedUpdaterThread.java:95)
Caused by: java.text.ParseException: Unparseable date: "Wed, 01 Feb 2012 22:00:00 GMT"
   at java.text.DateFormat.parse(Unknown Source)
   at org.codehaus.groovy.runtime.DefaultGroovyStaticMethods.parse(DefaultGroovyStaticMethods.java:181)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:51)
   at org.codehaus.groovy.runtime.metaclass.NewStaticMetaMethod.invoke(NewStaticMetaMethod.java:51)
   at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:148)
   at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:88)
   at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
   at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
   at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
   at Escapist$_extractItems_closure1.doCall(Escapist.groovy:37)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
   at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
   at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
   at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:885)
   at groovy.lang.Closure.call(Closure.java:405)
   at groovy.util.slurpersupport.NodeChildren.find(NodeChildren.java:194)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
   at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
   at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1055)
   at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:885)
   at groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149)
   at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39)
   at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
   at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
   at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
   at Escapist.extractItems(Escapist.groovy:36)
   at org.serviio.library.online.WebResourceUrlExtractor.parseWebResource(WebResourceUrlExtractor.java:29)
   at org.serviio.library.online.WebResourceParser.parse(WebResourceParser.java:56)
   ... 4 more

Hope that will be any help. I'm looking forward for this feed :)

Re: Escapist (including Zero Punctuation)

PostPosted: Wed Feb 08, 2012 5:41 am
by mike_metro
Wondering if this has to do with localization rules in date parsing. What country setting do you have? What is are you running?

Re: Escapist (including Zero Punctuation)

PostPosted: Wed Feb 08, 2012 11:56 am
by J K Kubius
I'm running windows 7 64-bit Home Premium SK, so it's Slovak localization with dd.mm.yyyy date format. Also i'm using jre7 from jdk1.7.0_02

Re: Escapist (including Zero Punctuation)

PostPosted: Fri Feb 10, 2012 12:29 pm
by patters
Tried this out on Synology NAS running 0.6.2 (Linux with en_US.utf8 locale) and I got an empty folder.

Re: Escapist (including Zero Punctuation)

PostPosted: Sun Feb 12, 2012 6:40 pm
by mike_metro
New version resolving date parsing issue.

Re: Escapist (including Zero Punctuation)

PostPosted: Sun Aug 26, 2012 6:40 am
by mike_metro
New version. Added a user agent when retrieving the json settings for the video.

Re: Escapist (including Zero Punctuation)

PostPosted: Tue Oct 30, 2012 6:44 pm
by nblu
I was having some issues with this plugin and after some debugging I found that the matcher does not work with the recent page changes.

To fix it change line 54 from
  Code:
def matcher = pageContent =~ '<param name="flashvars" value="config\\=(.*?)"\\/>'

to
  Code:
def matcher = pageContent =~ 'config=(.*?)%3Fplayer_version%'


Of course this might change again by the time you read this.

Thanks,
Nick