Access to an iframe that is called via javascript?

Hey guys,

 

Got another strange issue this morning.  Have been looking into a new channel based on this website but have run into a snag with the URL service.  My plan was to load the video iframe from the episode page and then use regex to pull the direct video link out of it.  However, the website very craftily hides its iframe urls and only displays them at the last minute via javascript.  

 

For example, when I open the page in a browser tab, the iframe is displayed and I can use xpath etc to find its url.  However, if I open the source code of the page, all I can see is the div container for the video.  The actual iframe is being called later via javascript.  Unfortunately, it seems it works the same with with Plex and the HTML object I'm loading into the plugin doesn't include the iframe information.  

 

Is there any way around this, or should I give up now and move on to a new source site?

 

Example Page

To find the iframe src you need to do a POST to this URL:

http://rawranime.tv/index.php?s=&app=anime&module=ajax&section=anime_watch_handler

where  is the id you can find in the HTML page somewhere near:

ipb.vars['session_id']

The values you need to post are:

  • md5check
    You'll find this value in the HTML page:
    
    
  • do
    With value getvid
  • id
    You'll find this value in the HTML page, it's the value of "rn":

Thank you!  You're a gentleman and a scholar, that worked great.  It's worth noting for anyone else who finds this thread that sander1's reply is specific to my source website however, the basic concept would be the same.

Actually, one more question:  Could I use a similar call to request the result of a form?  For example, the search function of the same website.  Using Chrome's network tracer I can see the values being sent with the request, is there a way I can format those to return the seach results page?  Would I just do it the same?  Thanks again for your help.

Actually, one more question:  Could I use a similar call to request the result of a form?  For example, the search function of the same website.  Using Chrome's network tracer I can see the values being sent with the request, is there a way I can format those to return the seach results page?  Would I just do it the same?  Thanks again for your help.

Yup, you'd just have to find the POST url and the keys and values being posted to that url.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.