Reading a github file using python returns HTML tags

后端 未结 5 1599
情书的邮戳
情书的邮戳 2020-12-18 07:40

I am trying to read a text file saved in github using requests package. Here is the python code I am using:

    import requests
    url = \'https://github.co         


        
5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-18 08:14

    You can access a text version by changing the beginning of your link to

    https://raw.githubusercontent.com/
    

提交回复
热议问题