i was able to extract fragments using streamlit-url-fragment module in streamlit version 1.8.1 but unable to do the same in ver 1.14.1.
This is happening due to auto refresh that is happening in browser address bar and removing url fragments automatically.
Steps to reproduce
Try Passing URL fragments for example below -
Thank you for looking into the issue, please find the code snippet below -
import streamlit as st
from streamlit_url_fragment import get_fragment
if __name__ == "__main__":
# -- Header Information
logger.info("Loading page configurations")
current_value = get_fragment()
if current_value is None:
Here i am trying to extract # fragments from the url.
Sample URL - 127.0.0.0:8051/#access_token=XYZ&token_type=Bearer
@Caroline - I tried it with the most recent Streamlit version also, but was facing the same issue.
Were you able to reproduce the issue i explained?
Quick Question - is there a way to get Request URL in Streamlit ?
We’ve experienced the same issue. We need to get a token from the fragment, but unfortunately anything after the # in the url is removed when the page loads.
Unfortunately even after many attempts we were unable to fix it, and so we had to reverted back to 1.9, which is the latest version without the issue.
@dclin Same for me as for @Ketan_Sharma, our token retrieval only supports returning the token as a fragment, not as a query param. Unfortunately there seems to be no way to disable Streamlit from removing the fragments.