diff --git a/data/python/bs4/python3-beautifulsoup4-test.py b/data/python/bs4/python3-beautifulsoup4-test.py new file mode 100644 index 000000000000..3b85b5480c7e --- /dev/null +++ b/data/python/bs4/python3-beautifulsoup4-test.py @@ -0,0 +1,6 @@ +import bs4 as bs +with open ("testpage.html") as file: + source = file.read() + +soup=bs.BeautifulSoup(source,'lxml') +assert soup.title.string=='Python Programming Tutorials' \ No newline at end of file diff --git a/data/python/bs4/testpage.html b/data/python/bs4/testpage.html new file mode 100644 index 000000000000..d0020856074a --- /dev/null +++ b/data/python/bs4/testpage.html @@ -0,0 +1,301 @@ + + +
+ + +Oh, hello! This is a wonderful page meant to let + you practice web scraping. This page was originally created to help people work with the Beautiful Soup + 4 library.
+ +The following table gives some general information for the following programming languages
:
+
Program Name | +Internet Points | +Kittens? | +
---|---|---|
Python | +932914021 | +Definitely | +
Pascal | +532 | +Unlikely | +
Lisp | +1522 | +Uncertain | +
D# | +12 | +Possibly | +
Cobol | +3 | +No. | +
Fortran | +52124 | +Yes. | +
Haskell | +24 | +lol. | +
I think it's clear that, on a scale of 1-10, python is:
+ +Javascript (dynamic data) test:
+y u bad tho?
+ + +Beautiful is better than ugly. +Explicit is better than implicit. +Simple is better than complex. +Complex is better than complicated. +Flat is better than nested. +Sparse is better than dense. +Readability counts. +Special cases aren't special enough to break the rules. +Although practicality beats purity. +Errors should never pass silently. +Unless explicitly silenced. +In the face of ambiguity, refuse the temptation to guess. +There should be one-- and preferably only one --obvious way to do it. +Although that way may not be obvious at first unless you're Dutch. +Now is better than never. +Although never is often better than *right* now. +If the implementation is hard to explain, it's a bad idea. +If the implementation is easy to explain, it may be a good idea. +Namespaces are one honking great idea -- let's do more of those!+ +
Whᶐt hαppéns now¿
+ + + + + + +