Changes between Version 3 and Version 4 of en/ProgrammingRobotsCourse/GettingWwwInfo


Ignore:
Timestamp:
Oct 28, 2019 4:31:50 PM (3 months ago)
Author:
xrambous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • en/ProgrammingRobotsCourse/GettingWwwInfo

    v3 v4  
    2222(Full example attachment:forecast.py)
    2323
     24=== Parse webpage data
     25
    2426If no API is provided, you can download and parse the webpage.
    2527
     28{{{#!python
     29from bs4 import BeautifulSoup
     30import requests
     31page = requests.get(url).text
     32soup = BeautifulSoup(page, features="lxml")
     33results = soup.findAll('h2', attrs={'class':'article-title'})
     34}}}
     35
     36(Full example attachment:news.py)