import urllib2
from bs4 import BeautifulSoup
def get_mainpage_txt(url):
    try:
        list=[]
        req = urllib2.urlopen(url, timeout=2)
        if req.getcode()==200:
            result=req.read()
            soup = BeautifulSoup(result, 'html.parser')
            text=soup.find_all("a")
            for j in text:
                list.append(j.get_text())
            return "&&".join(list)
    except:
        return None

