How can we show that $\int_{-\infty}^{+\infty}{ke^x\pm1\over \pi^2+(e^x-x+1)^2}\cdot{(e^x+1)^2\over \pi^2+(e^x+x+1)^2}\cdot 2x \,\mathrm dx=k?$ Motivated by this paper.
Conjecture:

$$\int_{-\infty}^{+\infty}{ke^x\pm1\over \pi^2+(e^x-x+1)^2}\cdot{(e^x+1)^2\over \pi^2+(e^x+x+1)^2}\cdot 2x \,\mathrm dx=k,\tag1$$
  where $k$ is a real number.

Making an attempt:
$u=e^x+1\implies \,\mathrm du=e^x\,\mathrm dx$ and let $k=1$ for simplification, then (1) becomes
$$\int_{1}^{\infty}{u^3\over \pi^2+(u-x)^2}\cdot{\ln(u-1)\over \pi^2+(u+x)^2}\cdot{2\mathrm du\over u-1}.\tag2$$
I have no idea where to go from here! I don't think substitution work here, probably using contour integration.
How can we prove (1)?
 A: First note that considering 
$$F(k)=\int_{-\infty}^{+\infty}{(ke^x\pm1)\over \pi^2+(e^x-x+1)^2}\cdot{(e^x+1)^2\over \pi^2+(e^x+x+1)^2}\cdot 2x \mathrm dx$$
Let $x \to \log(x)$
$$F(k)=\int_{0}^{+\infty}{(kx\pm1) \over \pi^2+(x-\log(x)+1)^2}\cdot{(x+1)^2\over \pi^2+(x+\log(x)+1)^2}\cdot \frac{2\log(x)}{x} \mathrm dx = k$$
By separating the integrals note that   
$$I_1=\int_{0}^{+\infty}{1 \over \pi^2+(x-\log(x)+1)^2}\cdot{(x+1)^2\over \pi^2+(x+\log(x)+1)^2}\cdot \frac{2\log(x)}{x} \mathrm dx=0$$
I could prove it numerically using Matlab. Hence I only show  

$$I_2=\int_{0}^{+\infty}{\log(x) \over \pi^2+(x-\log(x)+1)^2}\cdot{(x+1)^2\over \pi^2+(x+\log(x)+1)^2}\cdot \mathrm dx = \frac{1}{2}$$


Consider the function 
$$f(z) = \frac{(z-1)^2}{(1-(z+\log z))(1-(z-\log(z))}$$
Integrated around a key-hole contour around the principle branch of the logarithm 
$$\log(z) = \log|z|+i\mathrm{Arg}(z)$$
Hence the contour 

By taking the limits the smaller circle and the bigger one go to zero hence 
$$\int_{-\infty}^{0}\frac{(x-1)^2}{(1-(x+\log|x|+i\pi ))(1-(x-\log|x|-i\pi)}dx+\int_{0}^{-\infty}\frac{(x-1)^2}{(1-(x+\log|x|-i\pi ))(1-(x-\log|x|+i\pi)}dx = 2\pi i\mathrm{Res}(f,1)$$
Convert to the positive limit
$$\int_{0}^{\infty}\frac{(x+1)^2}{(1+x-\log x-i\pi )(1+x+\log x+i\pi)}-\frac{(x+1)^2}{(1+x-\log x+i\pi )(1+x+\log x-i\pi)}dx = 2\pi i\mathrm{Res}(f,1)$$
This magically reduces to our integral 
$$\int_{0}^{+\infty}{4\pi \,i \log(x) \over \pi^2+(x-\log(x)+1)^2}\cdot{(x+1)^2\over \pi^2+(x+\log(x)+1)^2}\cdot \mathrm dx = 2\pi i\mathrm{Res}(f,1)$$
Note that 
$$\mathrm{Res}(f,1) = \lim_{z \to 1}\frac{(z-1)^3}{(1-(z+\log z))(1-(z-\log(z))} = 1$$
Hence we finally get our result 
$$\int_{0}^{+\infty}{\log(x) \over \pi^2+(x-\log(x)+1)^2}\cdot{(x+1)^2\over \pi^2+(x+\log(x)+1)^2}\cdot \mathrm dx = \frac{1}{2}$$

Using the same approach we could show 

$$\int^\infty_{-\infty}\frac{dx}{(e^x-x+1)^2+\pi^2}=\frac{1}{2}$$

