Skip to content

Commit

Permalink
pull transcript data/file with class in dump.
Browse files Browse the repository at this point in the history
  • Loading branch information
katkamrachana committed Aug 6, 2017
1 parent 536f212 commit 2849c7f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,13 @@ def pick_media_from_content(content_soup):
if data_ele:
if 'media' in data_ele['data']:
find_file_from_media_url(data_ele['data'])

all_transcript_data = content_soup.find_all(attrs={'class':'transcript-data'})
for each_transcript in all_transcript_data:
data_ele = each_transcript.findNext('object',data=True)
if data_ele:
if 'media' in data_ele['data']:
find_file_from_media_url(data_ele['data'])
except Exception as pick_media_err:
error_log = "\n !!! Error found in pick_media_from_content()."
error_log += "\nError: " + str(pick_media_err)
Expand Down Expand Up @@ -549,7 +556,7 @@ def handle(self, *args, **options):
else:
global DUMP_NODE_objS_LIST
global TOP_PATH
datetimestamp = datetime.datetime.now().isoformat()
datetimestamp = datetime.datetime.now().strftime("%Y-%m-%d_%H-%M")
TOP_PATH = os.path.join(GSTUDIO_DATA_ROOT, 'data_export', slugify(dump_node_obj.name) + "_"+ str(datetimestamp))
SCHEMA_MAP_PATH = TOP_PATH
UNIT_NAMES = []
Expand Down

0 comments on commit 2849c7f

Please sign in to comment.