Help getting started - web scraper joox (1 Viewer)

nabbster

Portal Member
February 23, 2006
17
0
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
 

jburnette

Portal Pro
August 24, 2006
758
116
Kentucky
Home Country
United States of America United States of America
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)?
 

nabbster

Portal Member
February 23, 2006
17
0
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
 

jburnette

Portal Pro
August 24, 2006
758
116
Kentucky
Home Country
United States of America United States of America
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?
 

nabbster

Portal Member
February 23, 2006
17
0
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?
 

Users who are viewing this thread

Top Bottom