MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Plugins


Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here.

Reply
 
Thread Tools Display Modes
Old 2007-09-08, 22:57   #1 (permalink)
Portal Member
 
Join Date: Feb 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts


Default Help getting started - web scraper joox

Hi guys got loads of questions as i have never coded a plugin before have had some vb6 experience and i am using visual studio 2005 for this plugin - but i have very limited knowledge of this.

1, is visual studio 2005 ok for this plugin?

2, i have some code that will return via a webbrowser control the links on any given web page as follows:

Code:
Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click
		Dim i As Short
		
		For i = 0 To WebBrowser1.Document.DomDocument.links.Length - 1
			If InStr(1, WebBrowser1.Document.DomDocument.links.Item(i).href, "http://") = 1 Then
			List1.Items.Add(WebBrowser1.Document.DomDocument.links.Item(i).href)
		End If
	Next i
End Sub

page source looks like this: <a href="./cat/55/id/1585274">Stargate 906</a><br />
my code returns this: http://joox.net/cat/2/id/1585274

how would i get the link but also the category name so the links provided are recognizable i.e as in the source above
http://joox.net/cat/2/id/1585274 - Displayed = "Stargate 906"

3, after loads of googleing and research i have noticed that other web-scrap plugins have an xml front-end with the Gui layout to links on the desired web page. but once a link is clicked in media portal the results are displayed in media portal, how is this done? are the results loaded into strings, filtered and displayed with some sort of output command or is the window that displays the results a further xml written live in the background?.

i hope this is not to much to ask i am sure with a little help i can do this but in order to do so i need to understand the concept fully first then i can start with some serious coding and probably some more exacting questions. just need a push start to get going.

thanks in advance guys
nabbster is offline   Reply With Quote
Old 2007-09-09, 15:23   #2 (permalink)
Portal Member
 
jburnette's Avatar
 
Join Date: Aug 2006
Location: Kentucky
Age: 23
Posts: 713
Thanks: 131
Thanked 93 Times in 51 Posts

Country:

My System

Default

1. Yes.

2. Are you asking how to parse that? Or how to attach a URL to a string within a control (ie GUIListControl, etc)?
jburnette is offline   Reply With Quote
Old 2007-09-09, 17:34   #3 (permalink)
Portal Member
 
Join Date: Feb 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts


Default

No that code grabs the links on any page i visit but when i inter grate this into the plug in i dont want to see the links just the names of the files they relate to then click the name and and it will stream the file from the related link
but in order to do so i need to grab the links and store them along with the related filename
i.e

in the Gui you see this

Peepshow episode 1
peepshow episode 2

ect

but when i click peepshow episode 1 it will send the related link to play/ stream the file.
in short all i am trying to do is make a similar plugin to the online videos plugin but it does not support Joox so i am having a go at making my own. maybe the code i posted is the wrong way to go about it i dont know its just some code i played with outside of MP plug in to grab links. if this is the wrong way to go about it then maybe some guidence as to how to would be good.

thanks for the reply
nabbster is offline   Reply With Quote
Old 2007-09-09, 17:41   #4 (permalink)
Portal Member
 
jburnette's Avatar
 
Join Date: Aug 2006
Location: Kentucky
Age: 23
Posts: 713
Thanks: 131
Thanked 93 Times in 51 Posts

Country:

My System

Default

OK, what type of control are you using to display those within mediaportal? That will help you narrow down to a certain property you can store the URL itself in. For example a guilistitem would have a label2 and label3 property that you probably aren't using. Label would be the name of the episode. Stick the URL in one of those other two, make them not visible, and there you go. Is that what you mean?
jburnette is offline   Reply With Quote
Old 2007-09-12, 22:34   #5 (permalink)
Portal Member
 
Join Date: Feb 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Thanks for the reply well i am so new to vs2005 and the plug in thing i had not given that a thought in depth but assuming i use the guilistitem i would need to grab each link as a string with the discription name inclueded right? then split it
again assuming that i will use the guilistitem any snippets of code to get me started would be good. also other than guilistitem what other options are there?
nabbster is offline   Reply With Quote
Old 2007-10-12, 18:38   #6 (permalink)
Portal Member
 
Join Date: Oct 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts


Default Joox

So Have you succeded in the Joox plugin yet.... Ide love to have it...
AddeBC is offline   Reply With Quote
Old 2007-12-16, 21:37   #7 (permalink)
MP Donator
 
Join Date: Aug 2007
Posts: 39
Thanks: 3
Thanked 0 Times in 0 Posts

Country:


Default

yeah, would be great! so, any update on that???
4irm is offline   Reply With Quote
Reply

Bookmarks

Tags
joox, scraper, started, web

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sports webpage scraper (extension) zag2me Plugins 12 2006-10-08 18:08
getting started bxs122 Installation, configuration support 0 2006-10-03 15:06
Miniguide - Anyone started on this? CodeMonkey General Development (no feature request here!) 13 2006-05-27 14:56
Just getting Started Need advice Anonymous HTPC Projects 1 2005-03-01 21:13
Getting started with skinning Anonymous Skins 0 2004-12-05 15:50


All times are GMT +1. The time now is 09:50.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden