Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RFC downloader not working
#3
It's a little strange that it gives all that html back.
Not gone try to fix it,as you should not use urllib at all.

It work fine with Requests and also need to do a little parsing with BS.
Example:
from bs4 import BeautifulSoup
import requests

url = 'https://www.ietf.org/rfc/rfc2324.txt'
response = requests.get(url)
soup = BeautifulSoup(response.content, 'lxml')
pre = soup.find('p')
print(pre.text.strip())
Reply


Messages In This Thread
RFC downloader not working - by sidsr003 - Dec-19-2018, 01:29 PM
RE: RFC downloader not working - by Larz60+ - Dec-19-2018, 04:06 PM
RE: RFC downloader not working - by snippsat - Dec-19-2018, 09:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  m3u8 using build-in browser downloader? kucingkembar 3 760 Mar-29-2024, 01:47 AM
Last Post: kucingkembar
  Can not make this image downloader work Blue Dog 6 4,295 Jun-23-2020, 08:55 PM
Last Post: snippsat
  Multiple File Downloader Josh_Python890 1 2,606 Sep-16-2017, 11:19 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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