I have to parse (scrap) a webpage (html) and get some information, store it in a csv.
I have to do this using both Regex and BeautifulSoup, and I have absolute no prior experience with Python.
I’ll really appreciate if anyone can guide me accordingly for the code. I have managed to install python and BeautifulSoup.
For python 3 :
Read a web page with the following commands:
And match some regexp, for example, with:
If it find the regexp the matched string is written in m.groups()[0]
And clearly you must use your personal regexp in re.search
Visit:
http://docs.python.org/library/re.html