Python Forum
Fake UserAgent Issue NEED HELP !
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fake UserAgent Issue NEED HELP !
#2
adultsitem Wrote:I'm beginner level so I have very little knowladge sorry.
You should still try something an post that code,as reading a file has a lot of tutorial out there Wink

Let's say have a ua.txt file like this.
Output:
user-agent=Mozilla/5.0 1111 user-agent=Mozilla/5.0 2222 user-agent=Mozilla/5.0 3333
Read and make a list,then can eg choice a random from that list.
import random

with open('ua.txt') as f:
    ua = [i.strip() for i in f]

first = ua[0]
rand_ua = random.choice(ua)
print(first)
print(rand_ua)
Output:
user-agent=Mozilla/5.0 1111 user-agent=Mozilla/5.0 3333
Reply


Messages In This Thread
Fake UserAgent Issue NEED HELP ! - by adultsitem - Feb-07-2020, 04:26 PM
RE: Fake UserAgent Issue NEED HELP ! - by snippsat - Feb-07-2020, 04:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to find difference between fake driving license or real using python? pjaymn 5 2,974 Jun-14-2024, 07:01 AM
Last Post: Pedroski55
  generate a fake lag using python? jhave_21 4 4,827 Nov-12-2017, 04:23 AM
Last Post: jhave_21

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020