![]() |
|
[Python] Grabbing text by line - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] Grabbing text by line (/showthread.php?tid=6030790) |
Grabbing text by line - JJLAWTON4 - Dec 6, 2019 I am in the middle of making a discord bot. I am wanting to go get to a pastebin link and grab some account info and then send that to the user. BUT I want to grab like one set of credentials at a time. Basically by line and ideally random aswell. I know how to do all but the part of randomizing what its grabbing aswell as having it grabbed by one line RE: Grabbing text by line - Charger - Dec 6, 2019 Make the request Read the response Split the text at \r\n Each result from above is a line Return splitRes[Math.random(0,len(splitRes))] RE: Grabbing text by line - incognito04 - Dec 6, 2019 PHP Code RE: Grabbing text by line - JJLAWTON4 - Dec 7, 2019 I eneded up sorting it out. But basically I just used the random module and split it into a list to randomly grab one |