You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some website pages getting redirected to new link due to change in username or title
and in the Network tab it shows 301 status for the old link request.
It would be great to update bookmarked links to avoid duplicate bookmarks because of 301 status and redirects.
Note: pages which require login will get redirected too login page.
So need a checkbox to set the bookmark as autoupdate link if status is 301.
I've tested the below code for checking 301 status and getting the redirect link
import requests
url = "https://docs.new" # Replace with your target URL
response = requests.get(url, allow_redirects=False) # Prevent auto-following redirects
if response.status_code == 301:
new_url = response.headers.get('Location')
print("301 Redirected to:", new_url)
# output: 301 Redirected to: https://docs.google.com/document/u/0/create?usp=dot_new
else:
print("Status Code:", response.status_code)
The text was updated successfully, but these errors were encountered:
Hi Sascha,
Some website pages getting redirected to new link due to change in username or title
and in the Network tab it shows 301 status for the old link request.
It would be great to update bookmarked links to avoid duplicate bookmarks because of 301 status and redirects.
Note: pages which require login will get redirected too login page.
So need a checkbox to set the bookmark as autoupdate link if status is 301.
I've tested the below code for checking 301 status and getting the redirect link
The text was updated successfully, but these errors were encountered: