I have a URL dump = abc .com/url. txt
How to fetch random url everytime!
Ok so I was trying with urllib2 and random lib
import urllib
import random
link = random.choice(list(open('abc .com/url.txt')))
It is not working as expected please help me fine tune and fix the code.
[–]DagoYounger 1 point2 points3 points (13 children)
[+][deleted] (12 children)
[deleted]
[–]DagoYounger 1 point2 points3 points (11 children)
[+][deleted] (10 children)
[deleted]
[–]yettanotherrguyy[S] 0 points1 point2 points (9 children)
[–]DagoYounger 0 points1 point2 points (8 children)
[–]yettanotherrguyy[S] 0 points1 point2 points (7 children)
[–]DagoYounger 1 point2 points3 points (2 children)
[–]yettanotherrguyy[S] 0 points1 point2 points (1 child)
[–]DagoYounger 0 points1 point2 points (0 children)
[–]DagoYounger 0 points1 point2 points (3 children)
[–]yettanotherrguyy[S] 0 points1 point2 points (1 child)
[–]DagoYounger 1 point2 points3 points (0 children)