Hi, really hoping someone can help me out.
Im writing some python that gets a webpages content and then uses xpath to navigate the contents using urllib2 and its simple enough. The issue I am having is the page I am fetching redirects to another page which sometimes throws a 404 and all that is wrong is a small part of the redirected url is incorrect.
What i'm trying to do (but failing) is attempt to load the page, if a 404 occurs on redirect, get the url that caused the 404 as it will not be the one I called, do some url modification and then retry.
Can anyone help?