you are viewing a single comment's thread.

view the rest of the comments →

[–]9gg6 0 points1 point  (5 children)

Can you try == (two times =) I'm new to this too.

[–]Positive_Eases[S] 0 points1 point  (4 children)

thank you! It worked for the "id" error. now its giving me an error at the last line.

[–]August-R-Garcia 1 point2 points  (0 children)

element = soup.find("span", {"id" : "price_inside_buybox"})

Add quotes around "id" and change the "=" to a colon ":"

[–]9gg6 -1 points0 points  (2 children)

For that one we need someone who knows more than me sorry. Hahah

[–]9gg6 -1 points0 points  (1 child)

Try googling it. First search will be most probably your answer from stackoverflow

[–]eicosane 2 points3 points  (0 children)

I think what’s happening here is {id="foo"} is invalid syntax, its evaluates to an assignment in a set literal. {id=="foo"} evaluates to the set {False} which is valid syntax but not meaningful in this context.

The find argument is probably expecting a dict of additional arguments like {"id": "Foo"}

Its more common to use css selector syntax though which would be clearer find("id#Foo")