Python Forum
Get text from within h3 html tags
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get text from within h3 html tags
#2
Maybe this:

#! /usr/bin/env python3
import requests
from bs4 import BeautifulSoup as bs

page = requests.get('https://www.fundera.com/blog/business-finance-terms-and-definitions')
soup = bs(page.text, 'lxml')

# Can be a list of tags
# tags = ['h1', 'h2', 'h3']
# for tags in soup.find_all(tags):
for tags in soup.find_all('h3'):
    print(tags.text.strip())
Output:
1. Accounts Payable 2. Accounts Receivable 3. Accrual Basis 4. Accruals 5. Asset 6. Balance Sheet 7. Bookkeeping 8. Capital 9. Working Capital 10. Cash Flow 11. Cash Flow Projections 12. Depreciation 13. Fixed Asset 14. Gross Profit 15. Income Statement 16. Intangible Asset 17. Liability 18. Liquidity 19. Profit & Loss Statement 20. Statement of Cash Flow 21. Statement of Shareholders’ Equity 22. Annual Percentage Rate 23. Appraisal 24. Balloon Loan 25. Bankruptcy 26. Bootstrapping 27. Business Credit Report 28. Business Credit Score 29. Collateral 30. Credit Limit 31. Debt Consolidation 32. Debt Service Coverage Ratio 33. Debt Financing 34. Equity Financing 35. FICO Score 36. Financial Statements 37. Fixed Interest Rate 38. Floating Interest Rate 39. Guarantor 40. Interest Rate 41. Invoice Factoring or Financing 42. Lien 43. Line of Credit 44. Loan-to-Value 45. Long-Term Debt 46. Merchant Cash Advance 47. Microloan 48. Personal Guarantee 49. Principal 50. Revolving Line of Credit 51. Secured Loan 52. Term Loan 53. Unsecured Loans 54. Articles of Incorporation 55. Business Plan 56. Employer Identification Number (EIN) Certificate 57. Franchise Agreement 58. Net Worth 59. Retained Earnings 60. Tax Lien Meredith Wood
Pedroski55 likes this post
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags


Reply


Messages In This Thread
Get text from within h3 html tags - by Pedroski55 - Jan-02-2022, 12:55 AM
RE: Get text from within h3 html tags - by menator01 - Jan-02-2022, 02:22 AM
RE: Get text from within h3 html tags - by Larz60+ - Jan-04-2022, 05:45 AM
RE: Get text from within h3 html tags - by Larz60+ - Jan-05-2022, 06:50 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  why doesn't it replace all html tags? Melcu54 3 815 Jul-05-2023, 04:47 AM
Last Post: Melcu54
  Tkinterweb (Browser Module) Appending/Adding Additional HTML to a HTML Table Row AaronCatolico1 0 988 Dec-25-2022, 06:28 PM
Last Post: AaronCatolico1
  BeautifulSoup - I can't translate html tags that contain <a href=..</a> OR <em></em> Melcu54 10 1,749 Oct-27-2022, 08:58 AM
Last Post: wavic
  How to find tags using specific text (timestamps) in a url? q988988 1 1,414 Mar-08-2022, 08:09 AM
Last Post: buran
  reading html and edit chekcbox to html jacklee26 5 3,169 Jul-01-2021, 10:31 AM
Last Post: snippsat
  Parsing link from html tags with Python Melcu54 0 1,641 Jun-14-2021, 09:25 AM
Last Post: Melcu54
  Delimiters - How to skip some html tags from being translate Melcu54 0 1,692 May-26-2021, 06:21 AM
Last Post: Melcu54
  Including a Variable In the HTML Tags When Sending An Email JoeDainton123 0 1,924 Aug-08-2020, 03:11 AM
Last Post: JoeDainton123
  Making .exe file that requires access to text and html files ClassicalSoul 0 1,607 Apr-23-2020, 05:03 PM
Last Post: ClassicalSoul
  Loop through tags inside tags in Selenium/Python xpack24 1 5,754 Oct-23-2019, 10:15 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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