problem with string find

60 views
Skip to first unread message

Dessp

unread,
Jan 22, 2021, 7:04:58 AM1/22/21
to beautifulsoup
Hi guys, i am new here. I am stuck with such problem:

     print(armor_part_table.find(string="Level"))
     match = re.search('Level',str(armor_part_table))
     print(match.group(0))

and the output is:
None
Level

why find not finding "Level" text? 

if i print variable, it looks like:
<table class="wikitable">
<caption><a class="image" href="/File:Silent_Sniper_Head_4.png"><img alt="Silent Sniper Head 4.png" decoding="async" height="140" src="https://static.wikia.nocookie.net/letitdie_gamepedia/images/4/4a/Silent_Sniper_Head_4.png/revision/latest/scale-to-width-down/300?cb=20201204001120" width="300"/></a>
</caption>
<caption>Silent Sniper Head <font color="gold">★★★</font> (Faction: War Ensemble)
</caption>
<tbody><tr>
<th>Level
</th>
...

Thanks for support 

Daily Chinese

unread,
Jan 22, 2021, 8:52:25 AM1/22/21
to beauti...@googlegroups.com
i can send you my parser it is working  and one my another parsel( it puts data in the csv file. If you want we can have a call on zoom and i can explain for you how my parser 1 is working

--
You received this message because you are subscribed to the Google Groups "beautifulsoup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beautifulsou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beautifulsoup/c02fdfd2-5ab6-4071-a355-06c86d6f7bc1n%40googlegroups.com.
main.py
main2.py
Reply all
Reply to author
Forward
0 new messages