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

Discussão em 'Python' iniciado por Stack, Dezembro 1, 2024.

  1. Stack

    Stack Membro Participativo

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

    [​IMG]

    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:

    [​IMG]

    So how can I extract the table's data?

    Continue reading...

Compartilhe esta Página