-3

I want to get a fragment from a HTML website with python.

For example from the url http://steven-universe.wikia.com/wiki/Steven_Universe_Wiki I want to get the text in the box "next Episode", as a string. How can I get it?

Paul Floyd
  • 5,530
  • 5
  • 29
  • 43

1 Answers1

0

First of all download BeautifulSoup latest version from here and requests from here

from bs4 import BeautifulSoup
import requests

con = requests.get(url).content
soup = BeautifulSoup(con)
text = soup.find_all("a",href="/wiki/Gem_Harvest").text;
print(link)
Sriker Ch
  • 133
  • 11