Remove newline in python with urllib

前端 未结 3 521
名媛妹妹
名媛妹妹 2021-01-16 06:27

I am using Python 3.x. While using urllib.request to download the webpage, i am getting a lot of \\n in between. I am trying to remove it using the

3条回答
  •  我在风中等你
    2021-01-16 06:48

    Seems like they are literal \n characters , so i suggest you to do like this.

    raw_html2 = raw_html.replace('\\n', '')
    

提交回复
热议问题