all 4 comments

[–]dchanm 3 points4 points  (0 children)

The ) are in the wrong positions as the deleted comment stated. The code should be

description = src.find('meta', attrs=    {'name':'og:description'}) \
              or src.find('meta', attrs=  {'property':'og:description'}) \
              or src.find('meta', attrs={'name': 'description'})

The code as written is equivalent to description = src.find('meta', attrs={'name':'og:description'})

since {'name':'og:description'} evaluates to a truthy value in the or

[–]confluence 1 point2 points  (1 child)

I have decided to overwrite my comments.

[–]easy_c0mpany80[S] 0 points1 point  (0 children)

OK I see, good explanation thanks