GyuhoLee

[Fix] 추출한 자막 -> xml 관련 error 해결

1 -# Default ignored files
2 -/shelf/
3 -/workspace.xml
1 -<component name="InspectionProjectProfileManager">
2 - <settings>
3 - <option name="USE_PROJECT_PROFILE" value="false" />
4 - <version value="1.0" />
5 - </settings>
6 -</component>
...\ No newline at end of file ...\ No newline at end of file
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<project version="4">
3 - <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8" project-jdk-type="Python SDK" />
4 -</project>
...\ No newline at end of file ...\ No newline at end of file
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<project version="4">
3 - <component name="ProjectModuleManager">
4 - <modules>
5 - <module fileurl="file://$PROJECT_DIR$/.idea/src.iml" filepath="$PROJECT_DIR$/.idea/src.iml" />
6 - </modules>
7 - </component>
8 -</project>
...\ No newline at end of file ...\ No newline at end of file
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<module type="PYTHON_MODULE" version="4">
3 - <component name="NewModuleRootManager">
4 - <content url="file://$MODULE_DIR$" />
5 - <orderEntry type="inheritedJdk" />
6 - <orderEntry type="sourceFolder" forTests="false" />
7 - </component>
8 -</module>
...\ No newline at end of file ...\ No newline at end of file
1 -<?xml version="1.0" encoding="UTF-8"?>
2 -<project version="4">
3 - <component name="VcsDirectoryMappings">
4 - <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5 - </component>
6 -</project>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<project version="4">
3 + <component name="BranchesTreeState">
4 + <expand>
5 + <path>
6 + <item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
7 + <item name="LOCAL_ROOT" type="e8cecc67:BranchNodeDescriptor" />
8 + </path>
9 + <path>
10 + <item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
11 + <item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
12 + </path>
13 + <path>
14 + <item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
15 + <item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
16 + <item name="GROUP_NODE:origin" type="e8cecc67:BranchNodeDescriptor" />
17 + </path>
18 + </expand>
19 + <select />
20 + </component>
21 + <component name="ChangeListManager">
22 + <list default="true" id="b9decb0c-dc9e-4239-bdad-09ea8dd5179d" name="Default Changelist" comment="">
23 + <change beforePath="$PROJECT_DIR$/.idea/.gitignore" beforeDir="false" />
24 + <change beforePath="$PROJECT_DIR$/.idea/inspectionProfiles/profiles_settings.xml" beforeDir="false" />
25 + <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" />
26 + <change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" />
27 + <change beforePath="$PROJECT_DIR$/.idea/src.iml" beforeDir="false" />
28 + <change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" />
29 + <change beforePath="$PROJECT_DIR$/subtitle.py" beforeDir="false" afterPath="$PROJECT_DIR$/subtitle.py" afterDir="false" />
30 + <change beforePath="$PROJECT_DIR$/../캡스톤디자인_3주차_주간보고서.hwp" beforeDir="false" />
31 + </list>
32 + <option name="SHOW_DIALOG" value="false" />
33 + <option name="HIGHLIGHT_CONFLICTS" value="true" />
34 + <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
35 + <option name="LAST_RESOLUTION" value="IGNORE" />
36 + </component>
37 + <component name="Git.Settings">
38 + <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
39 + </component>
40 + <component name="ProjectId" id="1jir4Xi5aqgBUYhkE46q0J6kk2A" />
41 + <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
42 + <component name="ProjectViewState">
43 + <option name="hideEmptyMiddlePackages" value="true" />
44 + <option name="showLibraryContents" value="true" />
45 + </component>
46 + <component name="PropertiesComponent">
47 + <property name="ASKED_SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
48 + <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
49 + <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
50 + <property name="last_opened_file_path" value="$PROJECT_DIR$" />
51 + <property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
52 + </component>
53 + <component name="RunManager">
54 + <configuration name="subtitle" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
55 + <module name="src" />
56 + <option name="INTERPRETER_OPTIONS" value="" />
57 + <option name="PARENT_ENVS" value="true" />
58 + <envs>
59 + <env name="PYTHONUNBUFFERED" value="1" />
60 + </envs>
61 + <option name="SDK_HOME" value="" />
62 + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
63 + <option name="IS_MODULE_SDK" value="true" />
64 + <option name="ADD_CONTENT_ROOTS" value="true" />
65 + <option name="ADD_SOURCE_ROOTS" value="true" />
66 + <option name="SCRIPT_NAME" value="$PROJECT_DIR$/subtitle.py" />
67 + <option name="PARAMETERS" value="" />
68 + <option name="SHOW_COMMAND_LINE" value="false" />
69 + <option name="EMULATE_TERMINAL" value="false" />
70 + <option name="MODULE_MODE" value="false" />
71 + <option name="REDIRECT_INPUT" value="false" />
72 + <option name="INPUT_FILE" value="" />
73 + <method v="2" />
74 + </configuration>
75 + <recent_temporary>
76 + <list>
77 + <item itemvalue="Python.subtitle" />
78 + </list>
79 + </recent_temporary>
80 + </component>
81 + <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
82 + <component name="TaskManager">
83 + <task active="true" id="Default" summary="Default task">
84 + <changelist id="b9decb0c-dc9e-4239-bdad-09ea8dd5179d" name="Default Changelist" comment="" />
85 + <created>1604297563234</created>
86 + <option name="number" value="Default" />
87 + <option name="presentableId" value="Default" />
88 + <updated>1604297563234</updated>
89 + </task>
90 + <servers />
91 + </component>
92 + <component name="Vcs.Log.Tabs.Properties">
93 + <option name="TAB_STATES">
94 + <map>
95 + <entry key="MAIN">
96 + <value>
97 + <State />
98 + </value>
99 + </entry>
100 + </map>
101 + </option>
102 + </component>
103 + <component name="WindowStateProjectService">
104 + <state width="1899" height="282" key="GridCell.Tab.0.bottom" timestamp="1604304028779">
105 + <screen x="1920" y="0" width="1920" height="1040" />
106 + </state>
107 + <state width="1899" height="282" key="GridCell.Tab.0.bottom/0.0.1920.1040/1920.0.1920.1040@1920.0.1920.1040" timestamp="1604304028779" />
108 + <state width="1899" height="282" key="GridCell.Tab.0.center" timestamp="1604304028779">
109 + <screen x="1920" y="0" width="1920" height="1040" />
110 + </state>
111 + <state width="1899" height="282" key="GridCell.Tab.0.center/0.0.1920.1040/1920.0.1920.1040@1920.0.1920.1040" timestamp="1604304028779" />
112 + <state width="1899" height="282" key="GridCell.Tab.0.left" timestamp="1604304028779">
113 + <screen x="1920" y="0" width="1920" height="1040" />
114 + </state>
115 + <state width="1899" height="282" key="GridCell.Tab.0.left/0.0.1920.1040/1920.0.1920.1040@1920.0.1920.1040" timestamp="1604304028779" />
116 + <state width="1899" height="282" key="GridCell.Tab.0.right" timestamp="1604304028779">
117 + <screen x="1920" y="0" width="1920" height="1040" />
118 + </state>
119 + <state width="1899" height="282" key="GridCell.Tab.0.right/0.0.1920.1040/1920.0.1920.1040@1920.0.1920.1040" timestamp="1604304028779" />
120 + <state x="2381" y="164" key="SettingsEditor" timestamp="1604303734485">
121 + <screen x="1920" y="0" width="1920" height="1040" />
122 + </state>
123 + <state x="2381" y="164" key="SettingsEditor/0.0.1920.1040/1920.0.1920.1040@1920.0.1920.1040" timestamp="1604303734485" />
124 + </component>
125 +</project>
...\ No newline at end of file ...\ No newline at end of file
1 from pytube import YouTube 1 from pytube import YouTube
2 2
3 -video_url = 'https://www.youtube.com/watch?v=Zg3j6anDU6U' 3 +video_url = 'https://www.youtube.com/watch?v=ecUWKU_v318'
4 yt = YouTube(video_url) 4 yt = YouTube(video_url)
5 +title = yt.title
6 +description = yt.description
5 caption = yt.captions.get_by_language_code('ko') 7 caption = yt.captions.get_by_language_code('ko')
6 -if(caption == None):
7 - caption = yt.captions.all()[0]
8 -caption.xml_captions()
...\ No newline at end of file ...\ No newline at end of file
8 +caption_xml = caption.xml_captions
...\ No newline at end of file ...\ No newline at end of file
......