home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
OnlineVideos
OnlineVideos JSON parsing
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="howudodat" data-source="post: 1164638" data-attributes="member: 46799"><p>I am trying to create a generic site for OnlineVideos. The site returns JSON for categories, subcategories and videos. I have the categories working and subcategories partially. The problem I am having is how to ignore the first description and only process the subcategories array. Here is my regex, and the JSON</p><p></p><p>[code]{"description":"(?<description>[^"]*)","key":"(?<url>[^"]*)","name":"(?<title>[^"]*)","type(?:(?!vert).)*"vert(?:(?!sm").)*sm":"(?<thumb>[^"]*)",(?:(?!}},).)*}},[/code]</p><p></p><p>[code]{</p><p> "category": {</p><p> "description": "useless category description",</p><p> "key": "useless category key",</p><p> "name": "Useless Category Name",</p><p> "type": "container",</p><p> "tags": ["cat tag"],</p><p> "images": {</p><p> </p><p> },</p><p> "subcategories": [{</p><p> "description": "Description1",</p><p> "key": "subcat1",</p><p> "name": "SubCat 1",</p><p> "type": "container",</p><p> "tags": ["blahtag"],</p><p> "images": {</p><p> "horizontal": {</p><p> "md": "http://foo.bar/hm.png",</p><p> "sm": "http://foo.bar/hs/png"</p><p> },</p><p> "vert": {</p><p> "md": "http://foo.bar/vm.png",</p><p> "sm": "http://foo.bar/vs/png"</p><p> }</p><p> }</p><p> },</p><p> {</p><p> "description": "Description2",</p><p> "key": "subcat2",</p><p> "name": "SubCat 2",</p><p> "type": "container",</p><p> "tags": ["blahtag"],</p><p> "images": {</p><p> "horizontal": {</p><p> "md": "http://foo.bar/hm.png",</p><p> "sm": "http://foo.bar/hs/png"</p><p> },</p><p> "vert": {</p><p> "md": "http://foo.bar/vm.png",</p><p> "sm": "http://foo.bar/vs/png"</p><p> }</p><p> }</p><p> }]</p><p> }</p><p>}[/code]</p><p></p><p>The video list is formated very similar, but I think once I get the sub categories I can get the video list.</p><p>Also if there is subcategories of sub categories, is that possible?</p><p>ie;</p><p>[code]</p><p>Audio</p><p> 80s</p><p> <song list></p><p> 70s</p><p> <songlist></p><p>Video</p><p> Action</p><p> <movie list></p><p> Comedy</p><p> <movie list></p><p>...[/code]</p></blockquote><p></p>
[QUOTE="howudodat, post: 1164638, member: 46799"] I am trying to create a generic site for OnlineVideos. The site returns JSON for categories, subcategories and videos. I have the categories working and subcategories partially. The problem I am having is how to ignore the first description and only process the subcategories array. Here is my regex, and the JSON [code]{"description":"(?<description>[^"]*)","key":"(?<url>[^"]*)","name":"(?<title>[^"]*)","type(?:(?!vert).)*"vert(?:(?!sm").)*sm":"(?<thumb>[^"]*)",(?:(?!}},).)*}},[/code] [code]{ "category": { "description": "useless category description", "key": "useless category key", "name": "Useless Category Name", "type": "container", "tags": ["cat tag"], "images": { }, "subcategories": [{ "description": "Description1", "key": "subcat1", "name": "SubCat 1", "type": "container", "tags": ["blahtag"], "images": { "horizontal": { "md": "http://foo.bar/hm.png", "sm": "http://foo.bar/hs/png" }, "vert": { "md": "http://foo.bar/vm.png", "sm": "http://foo.bar/vs/png" } } }, { "description": "Description2", "key": "subcat2", "name": "SubCat 2", "type": "container", "tags": ["blahtag"], "images": { "horizontal": { "md": "http://foo.bar/hm.png", "sm": "http://foo.bar/hs/png" }, "vert": { "md": "http://foo.bar/vm.png", "sm": "http://foo.bar/vs/png" } } }] } }[/code] The video list is formated very similar, but I think once I get the sub categories I can get the video list. Also if there is subcategories of sub categories, is that possible? ie; [code] Audio 80s <song list> 70s <songlist> Video Action <movie list> Comedy <movie list> ...[/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
OnlineVideos
OnlineVideos JSON parsing
Contact us
RSS
Top
Bottom