简体   繁体   中英

Beautifulsoup. Result long random string

I am learning web scraping, however, I got issue preparing soup. It doesn't even look like the HTML code I can see while inspecting the page.

import requests
from bs4 import BeautifulSoup

URL = "https://www.mediaexpert.pl/"

response = requests.get(URL).text
soup = BeautifulSoup(response,"html.parser")

print(soup)

The result is like this: Result, soup

I tried to search the whole inte.net, but I think I have too little knowledge, for now, to find a solution. This random string is 85% of the result.

I will be glad for every bit of help.

BeautifulSoup does not deal with JavaScript generated content. It only works with static HTML. To extract data generated by JavaScript, you would need to use a library like Selenium.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2025 STACKOOM.COM