Skip to content

Commit be13a48

Browse files
committed
Updated to support linux as well as windows directory
1 parent 80f17ce commit be13a48

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

SeriesTorrentDownloader.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
from prettytable import PrettyTable
55

66
isHighQuality=True
7-
directory = 'C:\\Users\\rohan.yadav\\Downloads\\Movies'
7+
# change the directory where you would like to download torrents
8+
directory = '/home/rohan/Downloads/Movies'
89

910
def download_series(url,directory):
1011
if(url[0:24]!='https://ytstv.com/series'):
@@ -15,7 +16,7 @@ def download_series(url,directory):
1516
seasons = soup.select('.tvseason')
1617
index = 1
1718
series_name = soup.select('#mv-info > div.mvi-content > div.mvic-desc > h3')[0].text
18-
series_root_directory = directory+'\\'+series_name
19+
series_root_directory = os.path.join(directory,series_name)
1920
safeMkdir(series_root_directory)
2021
qual = input("enter y for high quality torrents else enter n\n")
2122
if qual =="n":
@@ -35,7 +36,7 @@ def download_series(url,directory):
3536
print('Bro select a valid option')
3637

3738
def downloadSeason(season_data,root_directory):
38-
season_directory = root_directory +'\\'+ season_data[0]
39+
season_directory = os.path.join(root_directory,season_data[0])
3940
safeMkdir(season_directory)
4041
episodes = season_data[1]
4142
for episode in episodes:
@@ -97,7 +98,7 @@ def get_list(soup):
9798
demo.append(least.select('.ml-mask')[0]['href'])
9899
arr.append(demo)
99100
except Exception as e:
100-
i
101+
pass
101102
return arr
102103

103104
def trim(unstripped_string):

0 commit comments

Comments
 (0)