Python Get Substring From End Javascript