from bs4 import BeautifulSoup
import requests

#http://sjz.58.com/sale.shtml
start_url = 'http://sjz.58.com/sale.shtml'

def get_channel_urls(url):
	wb_data = requests.get(url)
	soup = BeautifulSoup(wb_data.text,'lxml')

	links = soup.select("div.colWrap > div > div.board > em > a")

	for link in links:
		data = {
		'link' : start_url + link.get("href") if link.get("href")[:3] != "http" else None
		}
		print(data["link"])

#get_channel_urls(start_url)
channel_url = """
http://sjz.58.com/chuzu/
http://sjz.58.com/pinpaigongyu/?from=58_pc_zonghe_home_ppgy_wzl_shouyewzl
http://sjz.58.com/ershoufang/
http://sjz.58.com/shangpucz/
http://sjz.58.com/shengyizr/
http://sjz.58.com/duanzu/
http://sjz.58.com/ershouche/?minprice=0_3
http://sjz.58.com/ershouche/?minprice=3_5
http://sjz.58.com/ershouche/?minprice=5_8
http://sjz.58.com/ershouche/?minprice=8_10
http://sjz.58.com/ershouche/?minprice=10_15
http://sjz.58.com/ershouche/?minprice=15_20
http://sjz.58.com/jingjijiaoche/
http://sjz.58.com/paoche/
http://sjz.58.com/yeuyeche/
http://sjz.58.com/mpv/
http://sjz.58.com/dazhong/
http://sjz.58.com/bieke/
http://sjz.58.com/fute/
http://sjz.58.com/biaozhi/
http://sjz.58.com/fengtian/
http://sjz.58.com/bentian/
http://sjz.58.com/xiandai/
http://sjz.58.com/richan/
http://sjz.58.com/aodi/
http://sjz.58.com/baoma/
http://sjz.58.com/benchi/
http://sjz.58.com/wulingyou/
http://sjz.58.com/huochec/
http://sjz.58.com/kechec/
http://sjz.58.comhttp://www.58che.com/5219/?from=58tc.000027
http://sjz.58.comhttp://che.58.com/zhuanti/d/shanghaidazhong/sign.html?s=1&from=xinche_home&PGTID=0d000000-0000-09a0-bf24-693c5faace76&ClickID=1
http://sjz.58.comhttp://www.58che.com/2643/?from=58tc.000315
http://sjz.58.comhttp://www.58che.com/2801/?from=58tc.000316
http://sjz.58.com/zuche/
http://sjz.58.com/qichefw.shtml
http://sjz.58.com/qichefw.shtml
http://sjz.58.com/qichefw.shtml
http://sjz.58.com/pinche/
http://sjz.58.comhttp://mnks.jxedt.com/?from=58.com_index_qiche_1
http://sjz.58.com/jiajiao/
http://sjz.58.com/zhiyepeix/
http://sjz.58.com/youjiao/
http://sjz.58.com/xueli/
http://sjz.58.com/liuxue/
http://sjz.58.com/yimin/
http://sjz.58.com/shouji/0/
http://sjz.58.com/diannao/0/
http://sjz.58.com/bijiben/0/
http://sjz.58.com/pbdn/0/
http://sjz.58.com/shuma/0/
http://sjz.58.com/shoujihao/
http://sjz.58.com/danche/
http://sjz.58.com/fzixingche/
http://sjz.58.com/jiadian/
http://sjz.58.com/ershoujiaju/
http://sjz.58.com/jujia/0/
http://sjz.58.com/yingyou/0/
http://sjz.58.com/fushi/0/
http://sjz.58.com/ershoushebei/
http://sjz.58.com/yishu/
http://sjz.58.com/chengren/
http://sjz.58.com/bangong/
http://sjz.58.com/tushu/0/
http://sjz.58.com/lipin/0/
http://sjz.58.com/xiaoyuan/
http://sjz.58.com/tiaozao/0/
http://sjz.58.com/piao/
http://sjz.58.com/tiyusaishi/
http://sjz.58.com/gouwuka/
http://sjz.58.com/youyongka/
http://sjz.58.com/jipiao/
http://sjz.58.com/xiaofeika/
http://sjz.58.comhttp://jiaoyou.58.com/sjz/mm/?from=home-jiaoyou-mm
http://sjz.58.comhttp://jiaoyou.58.com/sjz/gg/?from=home-jiaoyou-gg
http://sjz.58.comhttp://jiaoyou.58.com/skills?from=home-jiaoyou-jinengjh
http://sjz.58.comhttp://jiaoyou.58.com/photowall/?from=home-jiaoyou-zpjx
http://sjz.58.comhttp://t.58.com/sjz/meishi/?from=58.com_home_liebiao_sjz_1
http://sjz.58.comhttp://t.58.com/sjz/shenghuo/?from=58.com_home_liebiao_sjz_2
http://sjz.58.comhttp://t.58.com/sjz/jiudian/?from=58.com_home_liebiao_sjz_3
http://sjz.58.comhttp://t.58.com/sjz/tianpin/?from=58.com_home_liebiao_sjz_5
http://sjz.58.comhttp://t.58.com/sjz/dianyingpiao/?from=58.com_home_liebiao_sjz_6
http://sjz.58.comhttp://t.58.com/sjz/ktv/?from=58.com_home_liebiao_sjz_7
"""







