Pages

04 August, 2024

How can I parse the data from a Table On a Google Docs Using Python?

I need to parse the data contained in a table on a Google Doc that looks like so:





This code:
import requests

def retrieve_parse_and_print_doc(docURL):
response = requests.get(docURL)
assert response.status_code == 200, 'Wrong status code'
lines = response.content.splitlines()
for line in lines:
print(line)

retrieve_parse_and_print_doc('
https://docs.google.com/document/...[elided]/pub') />


...returned data, but it doesn't appear to be useful:





So how can I extract the table's data?

No comments:

Post a Comment

Thanks