Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
KALYAN KUMAR NAIK
.
Toggle Highlighting
SQL
import wikipediaimport datetimedef fetch_latest_user_page_lengths(): # Get the current date today = datetime.datetime.now().date() # Get a list of the latest 10 user page discussion pages user_pages = wikipedia.page_titles(namespace=3, limit=10) # Initialize a list to store the page lengths page_lengths = [] # Iterate through the user pages and get the page length for page in user_pages: try: page_obj = wikipedia.page(page) page_lengths.append((page, page_obj.content_len)) except wikipedia.exceptions.PageError: continue return page_lengths# Example usageresults = fetch_latest_user_page_lengths()for page, length in results: print(f"Name: {page}") print(f"Description: User page discussion page created on {today}") print(f"Published: {length} characters") print()
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...