Created
March 22, 2022 12:43
-
-
Save CharlyWargnier/545293f3593f205a9ed863ff562f2bab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_search_console_data(webproperty): | |
if webproperty is not None: | |
# query = webproperty.query.range(start="today", days=days).dimension("query") | |
report = ( | |
webproperty.query.search_type(search_type) | |
.range("today", days=timescale) | |
.dimension(dimension) | |
.filter(filter_page_or_query, filter_keyword, filter_type) | |
.filter(filter_page_or_query2, filter_keyword2, filter_type2) | |
.get() | |
.limit(100) | |
.to_dataframe() | |
) | |
# report | |
# df = pd.DataFrame(r.rows) | |
return report | |
else: | |
st.warning("No webproperty found") | |
st.stop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment