Script that Navigates Page needs Javascript Functionality

7stud bbxx789_05ss at yahoo.com
Sat Aug 4 01:36:52 EDT 2007


On Aug 3, 7:58 pm, SMERSH009 <SMERSH0... at gmail.com> wrote:
> I have a script that navigates pages and scrapes the HTML source of
> the page.
> in order to view the results I need I need python to "navigate to"
> this Javascript link:
> javascript:__doPostBack('ctl00$cpMain$pagerTop','4')  This basically
> translates into "go to page 4."
> I read the posts on this group, and from what I understand, the
> functionality I need is with simplejson? If so, what is the syntax i
> would use to execute that Javascript?
> Or am I completely off base with using simplejson altogether?
>
> Thanks for the help
> -Sam

json is a specific way of formatting strings.  If an application
expects to receive a string as input and the string is supposed be
formatted according to json, then you need to send the app a json
formatted string.

>From the brief description I just read of simplejson, it allows you to
convert python objects to a string.  What makes you think that
simplejson has anything to do with executing javascript code?

When html pages are sent to a browser, there is software in the
browser that executes any javascript on the page.  If you use python
to download source code from a server, you are not loading anything in
a browser, so no javascript executes.




More information about the Python-list mailing list