in reply to Mechanize find links query

Pretty easy to pattern match if the URL's are hardcoded and always asssigned directly to window.location, but if the pages get complicated and assign the URL to a variable and then assign that to window.location, or specify the URL + variable arguments, you'll need something that can actually parse the Javascript and run it like would if you were viewing it in a web browser. Don't know how you'd go about solving that one. Are you only trying to farm one site, or are you trying for a general solution that works on any web site?

Replies are listed 'Best First'.
Re^2: Mechanize find links query
by Anonymous Monk on Dec 28, 2011 at 12:05 UTC
    Thank you for your reply. yes, that is what i am thinking about doing then, grab the whole page with 'content' and then pattern match it, the URLs are dynamically assigned to a variable but the URL always looks exactly the same, the only thing that varies is the last 4 digits which can also be grabbed without a problem whichever combination they come up with character class . I am 'farming' that website, but the issue will be common for many. even though the links are dynamically assigned, in the end they look like hardcoded, that is, you dont need to click on a JS link to make them show up. i ll work on that then, thanks regards