Ask coding questions

← Back to all posts
Why getting error?
ritika6401

can anyone correct line 21 ?

Voters
Jakman
Codemonkey51
ritika6401
Comments
hotnewtop
Jakman

So what exactly is this code supposed to do?

ritika6401

i'm learning web scraping in python. in the last lines of code i'm getting letter 'u' before each name @Jakman

Jakman

@ritika6401 so heres an idea of what you can do "
if ExampleWebscraper[0] == 'u':
del ExampleWebscraper[0]
" That is what i think could work to remove the u coming up everytime.

Codemonkey51

I'll look at it I will ping you in a comment when I find the solution

ritika6401

i got it i used - instead of _ in [email protected]

Codemonkey51

@ritika6401 sorry can't seem to find how to fix the error

Codemonkey51

Ohh lol @ritika6401

ritika6401
Codemonkey51

Ok lol one tip add a space at the end of your last word on replies to comments so the @ tag actually works @ritika6401

ritika6401

ohk. i got 1 more ques . i'm getting 'u' before each period-name @Codemonkey51

Codemonkey51

Oh that means it was encoded in Unicode you can remove that by doing

I think that will fix it
{text} as in the variable (in your case it would go behind: .gettext()
@ritika6401

ritika6401

i replaced .get_text() with .gettext() it is showing error.I'm a beginner so im not getting it @Codemonkey51

Codemonkey51

Sorry idk soup @ritika6401