Ask coding questions

← Back to all posts
Why getting error?
ritika6401 (3)

can anyone correct line 21 ?

Commentshotnewtop
Jakman (455)

So what exactly is this code supposed to do?

ritika6401 (3)

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

Jakman (455)

@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 (867)

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

ritika6401 (3)

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

Codemonkey51 (867)

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

Codemonkey51 (867)

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 (3)

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

Codemonkey51 (867)

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

{text}[1:]

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

ritika6401 (3)

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