登录类的两种用法: 1 loginmouser = LoginMouser() 该方法获取的代码可能是英文 也可能是中文 不能够持续稳定 2 loginmouser = LoginMouser(language='chinese/english') 或者 LoginMouser(**{'language':'chinese/english'}) """ print s #xz = get_xz('enter your language: 1 '' 2 english 3 chinese? ',['','english','chinese']) #xz = 'english' xz = 'chinese' loginmouser = LoginMouser(**{'language':xz}) list_pp_url = [ ('NXFT15WF104FA2B050','http://www.mouser.com/ProductDetail/Murata/NXFT15WF104FA2B050/?qs=MY6wChARw2zPK5aWQzI1iw%3d%3d'), ('192-103LET-A01','http://www.mouser.com/ProductDetail/Honeywell/192-103LET-A01/?qs=F1jq4PciTHsjJFtIlcHE0A%3d%3d'), #('1.5KE110AHE3/54','http://cn.mouser.com/ProductDetail/Vishay/15KE110AHE3-54/?qs=x89Eq0mR8pB2AFwsOPmnUQ%3d%3d'), #('MAX6956AAI+','http://cn.mouser.com/ProductDetail/Maxim-Integrated-Products/MAX6956AAI+/?qs=sGAEpiMZZMt7dcPGmvnkBkKqp%252bu5XOzFsAczKrFRP2w%3d'), ] i = 1 for pp,url in list_pp_url: print 343 #hc = loginmouser.get_hc_special(url)#登录后获取 hc = loginmouser.get_hc_normal(url)#不登录后获取 print 345,#hc[:1000] i += 1 file_html = os.path.join(DIRNAME,'mouser_login_linshi.html') write_hc_file(hc,'','',file_url=file_html) firefox(file_html) wt('124 continue? ') print 'end ',file_name