Python Forum
How to print particular text areas fron an HTML file (not site)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to print particular text areas fron an HTML file (not site)
#6
Quote: The question is that if the folder is html format then I cant open it at all.

Folders have no format.

A text file that happens to have the .html extension is still just a text file, and is the same as any .txt file (or .py file for that matter).  You don't need to supply an encoding to open() to open an html file, unless the file is actually encoded in a special way (most of them are not, though).
Reply


Messages In This Thread
RE: How to print particular text areas fron an HTML file (not site) - by nilamo - Dec-08-2017, 05:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Lightbulb Python Obstacles | Kung-Fu | Full File HTML Document Scrape and Store it in MariaDB BrandonKastning 5 3,121 Dec-29-2021, 02:26 AM
Last Post: BrandonKastning
  show csv file in flask template.html rr28rizal 8 35,360 Apr-12-2021, 09:24 AM
Last Post: adamabusamra
  HTML multi select HTML listbox with Flask/Python rfeyer 0 4,917 Mar-14-2021, 12:23 PM
Last Post: rfeyer
  Any way to remove HTML tags from scraped data? (I want text only) SeBz2020uk 1 3,632 Nov-02-2020, 08:12 PM
Last Post: Larz60+
  Open and read a tab delimited file from html using python cgi luffy 2 2,813 Aug-24-2020, 06:25 AM
Last Post: luffy
  Python3 + BeautifulSoup4 + lxml (HTML -> CSV) - How to loop to next HTML/new CSV Row BrandonKastning 0 2,472 Mar-22-2020, 06:10 AM
Last Post: BrandonKastning
  Web crawler extracting specific text from HTML lewdow 1 3,504 Jan-03-2020, 11:21 PM
Last Post: snippsat
  Help on parsing simple text on HTML amaumox 5 3,641 Jan-03-2020, 05:50 PM
Last Post: amaumox
  Sending file html ? JohnnyCoffee 3 89,521 Sep-06-2019, 04:32 PM
Last Post: snippsat
  Extract text between bold headlines from HTML CostasG 1 2,455 Aug-31-2019, 10:53 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

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