How to get a redirected connection

now the crawler doing keyword search on the home page of Baidu

but the connection is redirected
for example, how to get the redirected link
http://www.baidu.com/link?url.

https://baike.baidu.com/item/.

this is the redirected link, how to get the latter link through the previous link?

Oct.27,2021

send a request. Then disable redirection response Headers and have the redirected address ( host/loaction )

match "/ link?" after getting the link Url= "intercepts
Xiaobai nonsense


if you request this address, it responds to 301 or 302, and there should be a

of Location in the header.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e51aed-4514b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e51aed-4514b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?