Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os, time, glob, csv
- from datetime import datetime
- from datetime import timedelta
- from BeautifulSoup import BeautifulSoup
- def aclistcsv():
- src = glob.glob('d:\\trkbc\\20180405\\*_files')
- print src
- for fn in src:
- print fn
- soup = BeautifulSoup(open(fn+'\\main_welcome_page.htm'))
- table = soup.find('table',{"class":"clsForm"})
- #print table
- #acs = table.tbody.findChildren('input',{"id":"del_acct"})
- #for a in acs:
- #id, acno, name = str(a['value']).split('|')
- #dlist[acno]=name.replace(' ','<SP>').replace('\\','<SP>')+'<SP>(Rp)<SP>'+acno[:3]+'-'+acno[3:]
- #dst.writerow([acno, dlist[acno]])
- aclistcsv()
Advertisement
Add Comment
Please, Sign In to add comment