Skip to content

Instantly share code, notes, and snippets.

@tophyr
Last active November 19, 2015 23:51
Show Gist options
  • Save tophyr/cca972e618771fe483cf to your computer and use it in GitHub Desktop.
Save tophyr/cca972e618771fe483cf to your computer and use it in GitHub Desktop.
wtf beautifulsoup
#!/usr/bin/python
# coding=utf-8
import mechanize
import cookielib
from BeautifulSoup import BeautifulSoup
import html2text
html = '''
<div id="ContentPlaceHolder1_JobDetails2_Table1" border="0" cellpadding="0" cellspacing="0" width="100%">
<div style="display:table">
<td style="width: 60%; vertical-align: top;">
<div class="jobDetails_jobDesc" style="width:60%;display:table-cell" >
<span id="ContentPlaceHolder1_JobDetails2_lblDescription" class="jobDetail_jobDesc_Content"><p>The System Engineering team within Large Screen Devices (LSD) has an immediate opportunity for a Senior Software Developer. We are looking for a Software Developer with broad firmware and software experience, especially around operating system integration with various hardware platforms.<br/><p/><br/><p/>This position is responsible for providing technical guidance regarding drivers, firmware, and operating system capabilities and interfaces across multiple hardware development teams as well as being able to work at higher levels in the application stack directly with the operating and application development teams.<br/><p/> <br/><p/>This is a high-visibility role for a senior software developer who is comfortable dealing with ambiguity, driving features from inception to production and is seeking to innovate at a quick pace. The ideal candidate has a proven track record in cross-group collaboration, driving for results and passion for understanding all layers of the software stack as well as design and coding skills and a passion for customers. You will participate in the architecture, design and implementation of software to create integrated end-to-end solutions. You will utilize your breadth of experience and range of expertise to work cross-organization with the operating system, application platforms, firmware, and hardware teams to drive platform software design and test definition, performance optimization and drive system issues to resolution. You will work with other highly skilled project team members including system, electrical, optical, audio, hardware, and software engineers. You will participate in the elaboration of the scenarios, help analyze the existing products and infrastructure, understand how to leverage this infrastructure and help design, architect and implement new pieces to fill in the gaps to create integrated end to end experiences.<br/><p/><br/><p/>Qualifications: <br/><p/> &nbsp A BS/MS in Electrical Engineering, Computer Engineering, or Computer Science<br/><p/> &nbsp A minimum 7 years’ experience developing software that controls hardware (firmware, low-level software)<br/><p/> &nbsp A minimum 7 years’ experience with C++, C and some assembly.<br/><p/> &nbsp Experience with Visual Studio and the Win32 API.<br/><p/> &nbsp Experience with audio and video pipelines and APIs is a definite plus<br/><p/> &nbsp Experience in the design and implementation of hardware/software interfaces<br/><p/><br/><p/>Microsoft is an equal opportunity employer.  All qualified applicants will receive consideration for employment without regard to race, color, gender, sexual orientation, gender identity or expression, religion, national origin, marital status, age, disability, veteran status, genetic information, or any other protected status.<p/></span>
</div>
</td>
</div>
</div>'''
soup = BeautifulSoup(html, fromEncoding="utf-8")
print soup.find(id='ContentPlaceHolder1_JobDetails2_lblDescription').children
print soup.findAll("p")
exit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment