Skip to content

Instantly share code, notes, and snippets.

@Exodus111
Created July 25, 2014 21:44
Show Gist options
  • Save Exodus111/0a806f4c1191f618a646 to your computer and use it in GitHub Desktop.
Save Exodus111/0a806f4c1191f618a646 to your computer and use it in GitHub Desktop.
from bs4 import BeautifulSoup as bs
import requests
url = "en.wikipedia.org/wiki/List_of_X-Men_comics"
r = requests.get("http://" +url)
data = r.text
soup = bs(data)
text = soup.get_text()
for line in text.splitlines():
if "present)" in line:
print(line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment