Reputation: 15
I am trying to extract the novel description from this url https://www.wuxiaworld.co/Horizon-Bright-Moon-Sabre/
Howevery, when I try this code:
html=requests.get(site)
html.encoding = html.apparent_encoding
soup = BeautifulSoup(html.text,"html.parser")
summary = soup.find(id ='intro').get_text()
print (summary)
I get:
Description
Process finished with exit code 0
Any help would be appreciated, thanks in advance.
Upvotes: 0
Views: 59
Reputation: 10204
Try this:
site = "https://www.wuxiaworld.co/Horizon-Bright-Moon-Sabre/"
html = requests.get(site)
soup = BeautifulSoup(html.content)
summary = soup.find(id ='intro')
print(summary.text)
This prints out:
Description Fu Hongxue was a cripple, born with a lame leg and subject to epileptic seizures. He was also one of the most powerful, legendary figures of the martial arts world, with a dull black saber that was second to none. His fame made him a frequent target of challengers, but whenever his saber left its sheath, only corpses would remain in its wake. One day, however, F...
Upvotes: 0