Resolved: Python Request HTML for BeautifulSoup Parsing

In this post, we will see how to resolve Python Request HTML for BeautifulSoup Parsing

Question:

I have no idea it’s working only when I right-click, copy the entire body as HTML into a file and parse it, but when I access it directly from the link via request, I get 0 results.


Ex.
Sample HTML

bsoup.py


When I use these codes
Result: ✅Working, I can see 3 cover letters

bsoupv2.py


I’ve tried to use a request to a link instead.
URL Link updated
Result: ❌ Not Working, I can see 0 cover letter, nothing!

Best Answer:

Try to html.unescape the response from the www.bulongheng.com:
Prints:

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com