regression.py supports to compare _two result directories_,  we can't assume that it's generated by Autotest and stores in Autotest default result directory.

I suggested you add a parameter for regression.py to pass the job link.
You can generated the job link in another local script, that script calls the regression.py.
We could not mix too much un-general stuffs together.