for file in os.listdir("."):
if "P0k3M0N" in file:
list1.append(file)
you are reading too many files. For example, the one with the code will be appended to the list
f1 = open('last.txt', 'r')
f4 = open('last2.txt', 'r')
I have no idea why you use two txt files. Both have the same name, so either you just need one or the names aren't descriptive enough. As a last option, add a comment
Why f1 and f4? what happened to f2 and f3?
Also, calling variables by it's time is wrong. I know str1 is a string by seeing what is being assigned to it, but i want to know what it's used for. The same goes for list1, list2, etc
print("Last one: " + f1.readline())
print("Last: " + f4.readline())
Again, you are doing the same with two different variables. I can't tell the difference between "Last:" and "Last one:"
for i in list1:
index = i.find("x")
str1 = i[index + 1:index + 3]
list2.append(str1)
i should be used only in for i in xrange(...
everybody assumes it's an integer, not anything else.
assuming I understood it all, this is way more clear:
for file in files:
index = file.find("x")
episode_name = i[index + 1:index + 3]
episodes.append(episode_name)
You shpuld declare out just before the while where it's used, it makes it easier to quickly see what it's for
related to that, you should use functions to divide your problem in small portions with proper names
using xrange is more efficient than range without any downsides
instead of having the urls like that, you could declare them all in the same place as constants and replace the variable parts with this Los enlaces son solo para miembros.
Registrate o
iniciá sesiónpython doesn't have real constants but, by convention, any variable name in uppercase meants it shouldn't be changed
Try to fix all that, post your code and I will review it again