Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 11th, 2010, 08:33 PM
Registered User
Join Date: Jun 2008
Location: London, , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Talking A Cheeky Question

I live in the UK but love US tv shows especially certain comedy shows which are not available to UK IP addresses. However up until Jan this year I had developed an automated system to still watch these shows without using a proxy or VPN. With the help of a firefox addon I worked out the actual URl that plays the shows regardless of IP address it was hidden away within numerous AJAX calls. All I need is the relevant episode ID which I can plop into the URL and then I can watch the show regardless that my IP is in the UK. This was working great until this month as I could easily scrape these IDs from the relevant pages and then build up an HTML page with the relevant links so I could watch the shows whenever I wanted. However they have now changed their HTML source code so that the real ID's are not available in the HTML source instead they use an alias that is not related to the real ID. The alias is passed into their media server and the correct URI is returned. As they are using complex layered Ajax to load the videos and return the real ID from the alias it means that a) I cannot scrape anymore to get the true IDs b) web proxies or US proxy details don't work. At the moment for each show I am having to do the search manually e.g go to the page click the video and watch the HTTP requests and pick out the ID from the relevant request. This obviously is a pain to do and I would like to return to the happy days of an automated system if possible. I am not "hacking" as I am not bypassing any challenge/response authorisation and technically all the files are local on my PC (local temp files). Does anyone know of any form of proxy that works with complex AJAX requests that load the content? Its not the actual HTML page that is blocked by IP but the media server which is used by their video player which checks where the Javascript request is made from. Or can anyone think of a way I could automate accessing the relevant http request I need that only occurs when a link is clicked. I am considering some sort of Javascript crawler using an iframe to load the content and some code is required to simulate the relevant click and then read the HTTP requests but I am sure there is a simpler way.... Any code in any language is fine if it helps me :) Thanks for any help in advance
  #2 (permalink)  
Old January 12th, 2010, 04:40 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

I'd use Fiddler to investigate the response/requests. It can also be automated to extract the information you need.
Loading the page into an iframe is unlikely to work as you won't have access to the DOM of a page from a different domain.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disappearing UserName & Question within Customized PasswordRecovery Question Template eddiemcham ASP.NET 3.5 Basics 13 June 13th, 2009 04:23 AM
C++ question Edward King C++ Programming 1 July 3rd, 2008 07:02 AM
i have a question about .... saeedos BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 September 10th, 2005 05:28 PM
Help, From question..... daiz1010 Classic ASP Components 3 November 18th, 2004 01:17 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.