Python Final Project- need help!


#1



Hey everyone! I have a problem when running this program, it prints an empty string. This does not fill me with confidence that it is working correctly. If anyone is familiar with the modules used here, I would appreciate some advice. Thanks!


It should print out some prettified HTML but it doesn't.


def fetch_data():
	import os, sys, inspect
	import requests
	cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split

(inspect.getfile(inspect.currentframe() ))[0],"beautifulsoup4-4.1.0")))
	if cmd_subfolder not in sys.path:
		sys.path.insert(0, cmd_subfolder)
	from bs4 import BeautifulSoup
	result = requests.get("https://discuss.codecademy.com/t/markov-chain-not-

working/50318")
	soupystrings = BeautifulSoup(str(result), 'html.parser') # .get_text()
	tag = soupystrings.p
	return soupystrings
	print soupystrings.prettify()
	print tag.contents
fetch_data()


#2

you have a space inbetween the link in the code