Skip to content

Latest commit

 

History

History
6 lines (5 loc) · 770 Bytes

Learnt information.md

File metadata and controls

6 lines (5 loc) · 770 Bytes

What I learnt

  • Xpath: It is a format used to describe the location of any element on a webpage. Note that the actual HTML isn't coded in the Xpath.
  • Python's request library can't handle dynamic webpages. This is why Selenium is used

BeautifulSoup 4

  • When given a link which is then souped and given an element

    which has only a single child element Mother of Learning , soup.find('h2', class_='fiction-title') selects only the component and not all of it's children. find_next('a').atrrs.keys() returns 'href' and 'class' which correspond to the link and font-red-sunglo-bold, while the text is accessed by find_next('a').text which gives Mother of Learning