Code: Select all
[23:22] <LivingSouL> .movies now
[23:22] <DavaoCurrentAffairs> Movies Now Playing:
[23:22] <DavaoCurrentAffairs> [End of Movies Now Playing]
Code: Select all
if {$command == "" || $command == "now"} {
set regexm {<div id="nowshowing">.*?<td valign='top'>(.*?)</td>}
Code: Select all
regsub -all {<a href.*?>} $moviedata {} moviedata
regsub -all {</a>} $moviedata {} moviedata
set movienames [regexp -all -inline {<div class='h1'>(.*?)</div>} $moviedata]
regsub -all {<div class='h1'>.*?</div>} $movienames {} movienames
Code: Select all
<div id="nowshowing">
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class='padd'>
<table width='100%' border='0' cellspacing='0' cellpadding='2'>
<tr>
<td valign='top'>
<a href='info.php?nowshowing=133'><img src=http://www.nccc.com.ph/admin/_userfiles/cinema/thumb/133.jpg width='108' class='image'/></a>
</td>
rosc2112 wrote:Your first regex only gets:
Code: Select all
<div id="nowshowing"> <table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class='padd'> <table width='100%' border='0' cellspacing='0' cellpadding='2'> <tr> <td valign='top'> <a href='info.php?nowshowing=133'><img src=http://www.nccc.com.ph/admin/_userfiles/cinema/thumb/133.jpg width='108' class='image'/></a> </td>
Of course it's possible. Learn regexpjackblack wrote:would it be possible to alter this script to go off uk cinima coming soon,now showing,perhaps http://uk.movies.yahoo.com/now-showing.html
Personally, I'd make 2 seperate scripts, one for each website.can you help me about this one? how do we get regexp of two websites? they are diffrent cinemas here in my town, i want to gather entries about those two cinemas. can you guide me?
Code: Select all
if {$command == "option1"} {
set url "http://website1/page.html"
set regexpm "whatever needed for website1"
} elseif {$command == "option2"} {
set url "http://website2/page2.html"
set regexpm "whatever needed for website2
}
set html [::http::data $url]
# then process the html data to get the results, which will probably need more if/elseif tests to clean up based on which option was used on the commandline.
Code: Select all
<td colspan="2">.*?<table width="100%">(.*?)</table></td>