You need to get the correct URL from Oracle.com Each new release changes a hash and just substitution of links won't work.
Usage: wget --no-cookies --header "Cookie: oraclelicense=a" <URL>
For example:
wget --no-cookies --header "Cookie: oraclelicense=a" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
Usage: curl -L -b "oraclelicense=a" <URL> -O
For example:
curl -L -b "oraclelicense=a" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm -O