Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



   595

Little haaalp in python

by Blepop - 18 November, 2020 - 05:11 PM
This post is by a banned member (Blepop) - Unhide
Blepop  
Galactic
4.046
Posts
2.154
Threads
6 Years of service
#1
https://imgur.com/byPgsZe

haalpppp SadNigga
 
 
This post is by a banned member (Snake1337) - Unhide
Snake1337  
Godlike
2.316
Posts
317
Threads
6 Years of service
#2
(This post was last modified: 18 November, 2020 - 05:16 PM by Snake1337.)
use for loop , find all returns a list of shit ,
if you want the first element only then use find()
[Image: 7xibycc.jpg]

This post is by a banned member (Blepop) - Unhide
Blepop  
Galactic
4.046
Posts
2.154
Threads
6 Years of service
#3
(18 November, 2020 - 05:12 PM)Rattlesnake Wrote: Show More
use for loop , find all returns a list of shit ,
if you want the first element only then use find()

tf u saying nigga  Pepi
that dosent makes sense
thanks for replying anyway 
i send u some noodes  [Image: ughpepe.png]
 
 
This post is by a banned member (Snake1337) - Unhide
Snake1337  
Godlike
2.316
Posts
317
Threads
6 Years of service
#4
(18 November, 2020 - 05:17 PM)Blepop Wrote: Show More
(18 November, 2020 - 05:12 PM)Rattlesnake Wrote: Show More
use for loop , find all returns a list of shit ,
if you want the first element only then use find()

tf u saying nigga  Pepi
that dosent makes sense
thanks for replying anyway 
i send u some noodes  [Image: ughpepe.png]

money = soup.find('b').txt  this will do nigga

if money >''$0.01" this line doesn't make sense , how you comparing strings?
[Image: 7xibycc.jpg]

This post is by a banned member (Blepop) - Unhide
Blepop  
Galactic
4.046
Posts
2.154
Threads
6 Years of service
#5
(This post was last modified: 18 November, 2020 - 06:32 PM by Blepop.)
(18 November, 2020 - 05:20 PM)Rattlesnake Wrote: Show More
(18 November, 2020 - 05:17 PM)Blepop Wrote: Show More
(18 November, 2020 - 05:12 PM)Rattlesnake Wrote: Show More
use for loop , find all returns a list of shit ,
if you want the first element only then use find()

tf u saying nigga  Pepi
that dosent makes sense
thanks for replying anyway 
i send u some noodes  [Image: ughpepe.png]

money = soup.find('b').txt  this will do nigga

if money >''$0.01" this line doesn't make sense , how you comparing strings?

SadNigga
error is in this line
money = str(soup.find_all('b')[0].get_text())
 
 
This post is by a banned member (Snake1337) - Unhide
Snake1337  
Godlike
2.316
Posts
317
Threads
6 Years of service
#6
(18 November, 2020 - 06:15 PM)Blepop Wrote: Show More
(18 November, 2020 - 05:20 PM)Rattlesnake Wrote: Show More
(18 November, 2020 - 05:17 PM)Blepop Wrote: Show More
tf u saying nigga  Pepi
that dosent makes sense
thanks for replying anyway 
i send u some noodes  [Image: ughpepe.png]

money = soup.find('b').txt  this will do nigga

if money >''$0.01" this line doesn't make sense , how you comparing strings?

sir those are floats im comparing not strings
money = float
$0.01 = float
error is in this line
money = str(soup.find_all('b')[0].get_text())

Man everything inside " " is a string in py and also str function converts the inside shit into string like in your error line and ya I know the error line , money = float(soup.find('b').txt) use float () if you want to convert in float
[Image: 7xibycc.jpg]

This post is by a banned member (Blepop) - Unhide
Blepop  
Galactic
4.046
Posts
2.154
Threads
6 Years of service
#7
(18 November, 2020 - 06:23 PM)Rattlesnake Wrote: Show More
(18 November, 2020 - 06:15 PM)Blepop Wrote: Show More
(18 November, 2020 - 05:20 PM)Rattlesnake Wrote: Show More
money = soup.find('b').txt  this will do nigga

if money >''$0.01" this line doesn't make sense , how you comparing strings?

sir those are floats im comparing not strings
money = float
$0.01 = float
error is in this line
money = str(soup.find_all('b')[0].get_text())

Man everything inside " " is a string in py and also str function converts the inside shit into string like in your error line and ya I know the error line , money = float(soup.find('b').txt) use float () if you want to convert in float

https://imgur.com/5gky6Q5
big understood 
now read the bigger part and taaaallll me what should i replace that line with
 
 
This post is by a banned member (Snake1337) - Unhide
Snake1337  
Godlike
2.316
Posts
317
Threads
6 Years of service
#8
@Blepop that error you are getting on that line is cause nothing was found , so list is empty , and you are trying to access teh first element.
to write the correct line  , i might need to look at the html page/content , i seems you trying to get the vaule of money on the page , but prolly using wrong tag inside find_all() or something like that. if i can get the html content then i can write teh whole thing for you.
that's all i can say .
[Image: 7xibycc.jpg]


Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)