我想知道是否可以编写一个脚本来从<td class>
html 文件中写入所有可用选项。我知道我可以复制并粘贴源代码,但我真的很想学习数据挖掘。这是表的代码。我正在学习数据库和 PHP,我需要生成一个课程名册,我不想采取简单的方法复制和粘贴。同样,我想然后去每个部门并获取课程列表。
这是源代码:
<td class="dedefault" colspan="7">
<select id="subj_id" size="1" name="sel_subj">
<option selected="" value="%">not selected </option>
<option value="AA">AA - Allied Arts </option>
<option value="AAA">AAA - Architecture & Allied Arts </option>
<option value="AAAP">AAAP - Historic Preservation </option>
<option value="AAD">AAD - Arts & Administration </option>
<option value="ACTG">ACTG - Accounting </option>
<option value="AEIS">AEIS - Acad Eng for Intl Stu </option>
<option value="AFR">AFR - African Studies </option>
<option value="AIM">AIM - Applied Information Management </option>
<option value="ANTH">ANTH - Anthropology </option>
<option value="ARB">ARB - Arabic </option>
<option value="ARCH">ARCH - Architecture </option>
<option value="ARH">ARH - Art History </option>
<option value="ART">ART - Art </option>
<option value="ARTC">ARTC - Ceramics </option>
<option value="ARTD">ARTD - Digital Arts </option>
<option value="ARTF">ARTF - Fibers </option>
<option value="ARTM">ARTM - Metalsmithing & Jewelry </option>
<option value="ARTO">ARTO - Photography </option>
<option value="ARTP">ARTP - Painting </option>
<option value="ARTR">ARTR - Printmaking </option>
<option value="ARTS">ARTS - Sculpture </option>
<option value="ASIA">ASIA - Asian Studies </option>
<option value="ASL">ASL - American Sign Language </option>
<option value="ASTR">ASTR - Astronomy </option>
<option value="BA">BA - Business Administration </option>
<option value="BE">BE - Business Environment </option>
<option value="BI">BI - Biology </option>
<option value="CARC">CARC - Career Center </option>
<option value="CAS">CAS - College of Arts & Sciences </option>
<option value="CDS">CDS - Communication Disorders & Sci </option>
<option value="CFT">CFT - Couples & Family Therapy </option>
<option value="CH">CH - Chemistry </option>
<option value="CHN">CHN - Chinese </option>
<option value="CHNF">CHNF - Chinese Flagship </option>
<option value="CINE">CINE - Cinema Studies </option>
<option value="CIS">CIS - Computer & Information Science </option>
<option value="CIT">CIT - Computer Information Tech </option>
<option value="CLAS">CLAS - Classics </option>
<option value="COLT">COLT - Comparative Literature </option>
<option value="CPSY">CPSY - Counseling Psychology </option>
<option value="CRES">CRES - Conflict & Dispute Resolution </option>
<option value="CRWR">CRWR - Creative Writing </option>
<option value="CSCH">CSCH - College Scholars </option>
<option value="DAN">DAN - Dance Professional </option>
<option value="DANC">DANC - Dance Activity </option>
<option value="DANE">DANE - Danish </option>
<option value="DIST">DIST - Distance Education </option>
<option value="DSC">DSC - Decision Sciences </option>
<option value="EALL">EALL - East Asian Lang & Literature </option>
<option value="EC">EC - Economics </option>
<option value="EDLD">EDLD - Educational Leadership </option>
<option value="EDST">EDST - Education Studies </option>
<option value="EDUC">EDUC - Education </option>
<option value="ENG">ENG - English </option>
<option value="ENVS">ENVS - Environmental Studies </option>
<option value="ES">ES - Ethnic Studies </option>
<option value="ESC">ESC - Community Internship Program </option>
<option value="EURO">EURO - European Studies </option>
<option value="FHS">FHS - Family & Human Services </option>
<option value="FIN">FIN - Finance </option>
<option value="FINN">FINN - Finnish </option>
<option value="FLR">FLR - Folklore </option>
<option value="FR">FR - French </option>
<option value="FSEM">FSEM - Freshman Seminar </option>
<option value="GEOG">GEOG - Geography </option>
<option value="GEOL">GEOL - Geology </option>
<option value="GER">GER - German </option>
<option value="GRK">GRK - Greek </option>
<option value="GSS">GSS - General Social Science </option>
<option value="HBRW">HBRW - Hebrew </option>
<option value="HC">HC - Honors College </option>
<option value="HIST">HIST - History </option>
<option value="HPHY">HPHY - Human Physiology </option>
<option value="HUM">HUM - Humanities </option>
<option value="IARC">IARC - Interior Architecture </option>
<option value="INTL">INTL - International Studies </option>
<option value="IST">IST - Interdisciplinary Studies </option>
<option value="ITAL">ITAL - Italian </option>
<option value="J">J - Journalism </option>
<option value="JDST">JDST - Judaic Studies </option>
<option value="JGS">JGS - Japanese Global Scholars </option>
<option value="JPN">JPN - Japanese </option>
<option value="KRN">KRN - Korean </option>
<option value="LA">LA - Landscape Architecture </option>
<option value="LAS">LAS - Latin American Studies </option>
<option value="LAT">LAT - Latin </option>
<option value="LAW">LAW - Law </option>
<option value="LEAD">LEAD - Leadership Development </option>
<option value="LERC">LERC - Labor Educ & Research Center </option>
<option value="LIB">LIB - Library </option>
<option value="LING">LING - Linguistics </option>
<option value="LT">LT - Language Teaching </option>
<option value="MATH">MATH - Mathematics </option>
<option value="MDVL">MDVL - Medieval Studies </option>
<option value="MGMT">MGMT - Management </option>
<option value="MIL">MIL - Military Science </option>
<option value="MKTG">MKTG - Marketing </option>
<option value="MUE">MUE - Music Education </option>
<option value="MUJ">MUJ - Music Jazz Studies </option>
<option value="MUP">MUP - Music Performance </option>
<option value="MUS">MUS - Music </option>
<option value="NORW">NORW - Norwegian </option>
<option value="OIMB">OIMB - Oregon Inst of Marine Biology </option>
<option value="OLIS">OLIS - Oregon Ldrship Sustainability </option>
<option value="PD">PD - Product Design </option>
<option value="PDX">PDX - UO Portland Programs </option>
<option value="PEAE">PEAE - PE Aerobics </option>
<option value="PEAQ">PEAQ - PE Aquatics </option>
<option value="PEAS">PEAS - PE SCUBA </option>
<option value="PEC">PEC - PE Certification </option>
<option value="PEF">PEF - PE Fitness </option>
<option value="PEI">PEI - PE Individual Activities </option>
<option value="PEIA">PEIA - PE Intercollegiate Athletics </option>
<option value="PEL">PEL - PE Leadership </option>
<option value="PEMA">PEMA - PE Martial Arts </option>
<option value="PEMB">PEMB - PE Mind-Body </option>
<option value="PEOL">PEOL - PE Outdoor Pursuits - Land </option>
<option value="PEOW">PEOW - PE Outdoor Pursuits - Water </option>
<option value="PERS">PERS - PE Racquet Sports </option>
<option value="PERU">PERU - PE Running </option>
<option value="PETS">PETS - PE Team Sports </option>
<option value="PEW">PEW - PE Weight Training </option>
<option value="PHIL">PHIL - Philosophy </option>
<option value="PHYS">PHYS - Physics </option>
<option value="PORT">PORT - Portuguese </option>
<option value="PPPM">PPPM - Planning Public Policy Mgmt </option>
<option value="PS">PS - Political Science </option>
<option value="PSY">PSY - Psychology </option>
<option value="REES">REES - Russ & East European Studies </option>
<option value="REL">REL - Religious Studies </option>
<option value="RL">RL - Romance Languages </option>
<option value="RUSS">RUSS - Russian </option>
<option value="SAPP">SAPP - Substance Abuse Prev Prog </option>
<option value="SBUS">SBUS - Sports Business </option>
<option value="SCAN">SCAN - Scandinavian </option>
<option value="SERV">SERV - Service Learning </option>
<option value="SOC">SOC - Sociology </option>
<option value="SPAN">SPAN - Spanish </option>
<option value="SPED">SPED - Special Education </option>
<option value="SPSY">SPSY - School Psychology </option>
<option value="SWAH">SWAH - Swahili </option>
<option value="SWED">SWED - Swedish </option>
<option value="TA">TA - Theater Arts </option>
<option value="TLC">TLC - Univ Teaching & Learning Ctr </option>
<option value="WGS">WGS - Women's & Gender Studies </option>
<option value="WR">WR - Writing </option>
以下是部门课程列表的基础知识:
<tr>
<td style="font-weight:bolder">
<a href="/Classes/index.php?course=cis110">CIS 110 Fluency with Information Technology</a>
</td> </tr>