Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Downloading txt files
#2
You can install requests with:

py -m pip install requests
But you can also use urllib.request.urlopen

from urllib.request import urlopen
from bs4 import BeautifulSoup


req = urlopen('http://google.de')
bs = BeautifulSoup(req.read(), 'html.parser')
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
Downloading txt files - by tjnichols - Aug-27-2018, 04:16 PM
RE: Downloading txt files - by DeaD_EyE - Aug-27-2018, 04:38 PM
RE: Downloading txt files - by buran - Aug-27-2018, 04:51 PM
RE: Downloading txt files - by Gribouillis - Aug-27-2018, 05:01 PM
RE: Downloading txt files - by tjnichols - Aug-27-2018, 05:36 PM
RE: Downloading txt files - by buran - Aug-27-2018, 06:03 PM
RE: Downloading txt files - by tjnichols - Aug-27-2018, 10:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Downloading CSV from a website bmiller12 1 2,445 Nov-26-2020, 09:33 AM
Last Post: Axel_Erfurt
  Downloading book preview Truman 6 4,847 May-15-2019, 10:02 PM
Last Post: Truman
  Downloading Multiple Webpages MoziakBeats 4 4,430 Apr-17-2019, 04:06 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020