Need help with HTML parsing
#1
Hi
I'm parsing a website and I need to dive into the trailer page link from the main movie page in order to get the youtube link.

Can I do such thing or all of the data must come from the page the user selects (the one that's in <SearchResults>) ?
Reply
#2
The simplest method would be to create a custom function and then add a URL calling that function to the output of GetDetails.

So somewhere in GetDetails, you'd have something like:
Code:
<RegExp input="$$1" output="&lt;url function=&quot;TrailerFunctionName&quot;&gt;http://URL_to_trailer_page.com&lt;/url&gt;" dest="5+">
    <expression>...</expression>
</RegExp>

Then outside of GetDetails you'd have something like:
Code:
<TrailerFunctionName dest="8">
    <RegExp input="$$5" output="&lt;details&gt;\1&lt;/details&gt;" dest="8">
        <RegExp input="$$1" output="&lt;trailer&gt;Link_to_trailer&lt;/trailer&gt;" dest="5">
            <expression>...</expression>
        </RegExp>
        <expression noclean="1"/>
    </RegExp>
</TrailerFunctionName>
(Obviously, you'll need to tailor all that to fit your situation.)

After GetDetails has run, the "TrailerFunctionName" function will be run, loading up buffer $$1 with the contents of the URL you passed to it.
Reply
#3
Thank you!
Worked!
Reply

Logout Mark Read Team Forum Stats Members Help
Need help with HTML parsing0