ghx8

Untitled

Apr 9th, 2018
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. import os, time, glob, csv
  2. from datetime import datetime
  3. from datetime import timedelta
  4. from BeautifulSoup import BeautifulSoup
  5.  
  6. def aclistcsv():
  7. src = glob.glob('d:\\trkbc\\20180405\\*_files')
  8. print src
  9. for fn in src:
  10. print fn
  11. soup = BeautifulSoup(open(fn+'\\main_welcome_page.htm'))
  12. table = soup.find('table',{"class":"clsForm"})
  13. #print table
  14. #acs = table.tbody.findChildren('input',{"id":"del_acct"})
  15. #for a in acs:
  16. #id, acno, name = str(a['value']).split('|')
  17. #dlist[acno]=name.replace(' ','<SP>').replace('\\','<SP>')+'<SP>(Rp)<SP>'+acno[:3]+'-'+acno[3:]
  18. #dst.writerow([acno, dlist[acno]])
  19.  
  20. aclistcsv()
Advertisement
Add Comment
Please, Sign In to add comment