mardi 9 février 2016

search in website from application

I want to type in a textbox a movie name, press a button and return the rating of that movie in listbox. I have read on the forum that youcan do something with the RSS fedd but I have no idea how it works.

I have done something similar with regex for the showtime of movie where I press a button and all the movies that are at a certain cinema appears in a listbox. Here is the code of my app from the showtime if it can help :)

    Imports System.Text.RegularExpressions
    Public Class frmCinema
    Dim conterTitre As Integer
    Private Sub btnCinema1_Click(sender As Object, e As EventArgs) Handles btnCinema1.Click
        Dim source As String = (New Net.WebClient).DownloadString("http://ift.tt/1o0EN9S")
        Dim title As String = "<a href=""([^<]*)"">([^<]*)</a>"


        For Each item As Match In (New Regex(title)).Matches(source)
            listCinema1.Items.Add(item.Groups(2).Value)
        Next

        listCinema1.Items.RemoveAt(0)

        btnCinema1.Enabled = False
    End Sub

Thanks for the help :)




Aucun commentaire:

Enregistrer un commentaire