Neels
10-04-2009, 03:33 PM
Greetings,
Please have some patience as I'm not a python/web/html/soup developer :)
I am trying to return the print version of an article from an rss feed. The url looks something like this:
http://www.news24.com/Content/SouthAfrica/News/1059/1cfd873e535e4b5ab944da15f15aff46/04-10-2009%2008-08/CT_faces_huge_maintenance_bill
The print version url looks like this:
http://www.news24.com/printArticle.aspx?iframe&aid=1cfd873e-535e-4b5a-b944-da15f15aff46&cid=1059
The problem is that the print url is supplied through a java script:
<script language="JavaScript">
function openPrintWindow() {
myPrintWindow = window.open('http://www.news24.com/printArticle.aspx?iframe&aid=1cfd873e-535e-4b5a-b944-da15f15aff46&cid=1059','myPrintWindow','toolbar=0,location=0,di rectories=0,status=0,menubar=0,scrollbars=1,resiza ble=0,width=750,height=600');
}
</script>
So, what is the easiest way to grab that URL from the java script? I've looked at some of the builtin recipes but could not find anything that relates to a specific case like this. Or maybe I just didn't understand the python code ;)
Any help appreciated.
Regards,
Neels
Please have some patience as I'm not a python/web/html/soup developer :)
I am trying to return the print version of an article from an rss feed. The url looks something like this:
http://www.news24.com/Content/SouthAfrica/News/1059/1cfd873e535e4b5ab944da15f15aff46/04-10-2009%2008-08/CT_faces_huge_maintenance_bill
The print version url looks like this:
http://www.news24.com/printArticle.aspx?iframe&aid=1cfd873e-535e-4b5a-b944-da15f15aff46&cid=1059
The problem is that the print url is supplied through a java script:
<script language="JavaScript">
function openPrintWindow() {
myPrintWindow = window.open('http://www.news24.com/printArticle.aspx?iframe&aid=1cfd873e-535e-4b5a-b944-da15f15aff46&cid=1059','myPrintWindow','toolbar=0,location=0,di rectories=0,status=0,menubar=0,scrollbars=1,resiza ble=0,width=750,height=600');
}
</script>
So, what is the easiest way to grab that URL from the java script? I've looked at some of the builtin recipes but could not find anything that relates to a specific case like this. Or maybe I just didn't understand the python code ;)
Any help appreciated.
Regards,
Neels