Turn on thread page Beta
    • Thread Starter
    Offline

    2
    ReputationRep:
    I searched thoroughly for solution on many websites and on here but none of them works!I am trying to scrap flashscores.com and i want to parse a with the class name 'cell_ab team-home ' or 'cell_ab team-home bold '

    I tried using re

    Code:
    soup.find_all('td', { 'class'= re.compile(r"^(cell_ab team-home |cell_ab team-home  bold )$")
    )

    and

    Code:
    soap.find_all('td', { 'class' : ['cell_ab team-home ','cell_ab team-home  bold '])
    neither of them works.
    Offline

    3
    ReputationRep:
    According to the docs you should be doing something like this:
    Code:
    soup.find_all("td", class_=re.compile("cell_ab team-home | cell_ab team-home  bold"))
 
 
 
Reply
Submit reply
Turn on thread page Beta
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: May 10, 2015

1,713

students online now

800,000+

Exam discussions

Find your exam discussion here

Poll
Should universities take a stronger line on drugs?
Useful resources

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.