-
Notifications
You must be signed in to change notification settings - Fork 217
/
Copy pathFoOlSlide.lua
285 lines (273 loc) · 11.2 KB
/
FoOlSlide.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
local dirurl = '/directory/'
local dirurlreader = '/reader/directory/'
local dirurlfoolslide = '/foolslide/directory/'
local dirurlslide = '/slide/directory/'
local dirurlslideU = '/Slide/directory/'
local dirurlonline = '/online/directory/'
local dirurlhelvetica = '/r/directory/'
local dirurllector = '/lector/directory/'
local dirurlfsdir = '/fs/directory/'
local dirurlreaderlist = '/fs/reader/list/'
function getWithCookie(lurl)
if http.get(lurl) then
local x = TXQuery.Create(http.document)
local s = x.xpathstring('//form//input[(@type="hidden") and (@name="adult")]/@value')
if s:lower() == 'true' then
http.reset()
return http.post(lurl, 'adult=true')
end
return true
else
return false
end
end
function getdirurl(website)
local dirs = {
['Jaiminisbox'] = dirurlreader,
['DokiFansubs'] = dirurlreader,
['AtelierDuNoir'] = dirurlreader,
['OneTimeScans'] = dirurlfoolslide,
['DejameProbar'] = dirurlslide,
['MenudoFansub'] = dirurlslide,
['SolitarioNoFansub'] = dirurlslide,
['Pzykosis666HFansub'] = dirurlonline,
['SeinagiFansub'] = dirurlonline,
['HelveticaScans'] = dirurlhelvetica,
['RavensScans'] = dirurllector,
['NoraNoFansub'] = dirurllector,
['HotChocolateScans'] = dirurlfsdir,
['AntisenseScans'] = dirurlonline,
['MangaichiScan'] = dirurlfsdir,
['Riceballicious'] = dirurlreaderlist,
['Yuri-ism'] = dirurlslide,
['MangajinNoFansub'] = dirurllector,
['BunnysScans'] = '/read/directory/',
['CanisMajorScans'] = dirurlreader,
['HoshikuzuuScans'] = dirurl,
['YaoiIsLife'] = dirurlreader,
['FujoshiBitches'] = dirurlreader,
['TapTrans'] = dirurlfsdir,
['LoliVault'] = dirurlonline
}
if dirs[website] ~= nil then
return dirs[website]
else
return dirurl
end
end
function getinfo()
local lurl = MaybeFillHost(module.rooturl, url)
local result = net_problem
if getWithCookie(lurl) then
x = TXQuery.Create(http.document)
mangainfo.coverlink = x.xpathstring('//div[@class="thumbnail" or contains(@class, "thumb")]/img/@src')
if mangainfo.title == '' then
if module.website == 'AtelierDuNoir' then
mangainfo.title = x.xpathstring('//div[@class="section-headline"]//h3')
else
mangainfo.title = x.xpathstring('//h1[@class="title"]')
end
end
if Pos('emailprotected', mangainfo.title) > 0 then
mangainfo.title = Trim(SeparateLeft(x.xpathstring('//title'), '::'))
end
local cls = 'info'
mangainfo.authors = string.gsub(
x.xpathstring('//div[@class="'..cls..'"]/*[contains(text(),"Author")]/following-sibling::text()[1]'),
'^[%s:]*', '')
mangainfo.artists = string.gsub(
x.xpathstring('//div[@class="'..cls..'"]/*[contains(text(),"Artist")]/following-sibling::text()[1]'),
'^[%s:]*', '')
mangainfo.summary = string.gsub(
x.xpathstring('//div[@class="'..cls..'"]/*[contains(text(),"Synopsis")]/following-sibling::text()[1]'),
'^[%s:]*', '')
v = x.xpath('//div[@class="list"]//div[@class="title"]/a')
for i = 1, v.count do
v1 = v.get(i)
mangainfo.chapterlinks.add(v1.getattribute('href'))
if v1.getattribute('title') ~= '' then
mangainfo.chapternames.add(v1.getattribute('title'))
else
mangainfo.chapternames.add(v1.ToString)
end
end
InvertStrings(mangainfo.chapterlinks, mangainfo.chapternames)
result = no_error
end
return result
end
function getinfo_ths()
mangainfo.url=MaybeFillHost(module.RootURL, url)
if getWithCookie(mangainfo.url) then
local x=TXQuery.Create(http.document)
mangainfo.title=x.xpathstring('//div[@id="series_right"]/h1')
mangainfo.coverlink=MaybeFillHost(module.RootURL, x.xpathstring('//img[@class="series_img"]/@src'))
mangainfo.authors = x.xpathstring('//ul[@class="series_left_data"]/li[contains(span, "Author")]/span[@class="value"]')
mangainfo.artists = x.xpathstring('//ul[@class="series_left_data"]/li[contains(span, "Artist")]/span[@class="value"]')
mangainfo.genres=x.xpathstringall('//ul[@class="series_left_data"]/li[contains(span, "Genre")]/span[@class="value"]/text()')
mangainfo.status=MangaInfoStatusIfPos(x.xpathstring('//ul[@class="series_left_data"]/li[contains(span, "Status")]/span[@class="value"]'))
mangainfo.summary = x.xpathstring('//div[@id="series_des"]')
x.xpathhreftitleall('//div[@id="staff"]/div/a', mangainfo.chapterlinks, mangainfo.chapternames)
InvertStrings(mangainfo.chapterlinks,mangainfo.chapternames)
return no_error
else
return net_problem
end
end
function taskstart()
task.pagelinks.clear()
task.pagenumber = 0
return true
end
function getpagenumber()
local result = false
if getWithCookie(MaybeFillHost(module.rooturl, url)) then
x = TXQuery.create(http.document)
task.pagenumber = x.xpath('//div[@class="topbar_right"]//ul[@class="dropdown"]/li').count
s = x.xpathstring('//script[contains(.,"var pages")]')
if s ~= '' then
s = GetBetween('var pages = ', ';', s)
if Pos('atob("', s) > 0 then
s = GetBetween('atob("', '")', s)
s = DecodeBase64(s)
end
x.parsehtml(s)
v = x.xpath('json(*)()("url")')
for i = 1, v.count do
task.pagelinks.add(v.get(i).ToString)
end
end
result = true
end
return result
end
function getimageurl()
local result = false
local s = url
if workid > 0 then
s = AppendURLDelim(s) .. 'page/' .. (workid + 1)
end
if getWithCookie(MaybeFillHost(module.rooturl, s)) then
x = TXQuery.create(http.document)
task.pagelinks.set(workid, x.XPathString('//div[@id="page"]//img/@src'))
end
return result
end
function getdirectorypagenumber()
local result = net_problem
page = 1
if getWithCookie(module.rooturl .. getdirurl(module.website)) then
result = no_error
x = TXQuery.create(http.document)
v = x.xpath('//*[@class="next"]/a/@href')
for i = 1, v.count do
local s = tonumber(string.match(v.get(i).tostring, '/(%d+)/$'))
if (s ~= nil) and (s > page) then
page = s
end
end
end
return result
end
function getnameandlink()
local result = net_problem
local s = module.rooturl .. getdirurl(module.website)
if url ~= '0' then
s = s .. (tonumber(url) + 1) .. '/'
end
if getWithCookie(s) then
result = no_error
local x = TXQuery.create(http.document)
if module.website == 'AtelierDuNoir' then
local v = x.xpath('//div[@class="caption"]')
for i = 1, v.count do
v1 = v.get(i)
links.add(x.xpathstring('div/a/@href', v1))
names.add(x.xpathstring('h4', v1))
end
elseif module.website == 'TwistedHelScans' then
local v = x.xpath('//div[contains(@class, "series_card")]/a')
for i = 1, v.count do
local v1 = v.get(i)
links.add(v1.getattribute('href'))
names.add(x.xpathstring('span', v1))
end
else
x.XpathHREFAll('//div[@class="list series"]/div/div[@class="title"]/a', links, names)
end
end
return result
end
function AddWebsiteModule(name, url, category)
local m = NewModule()
m.website = name
m.rooturl = url
m.category = category
m.lastupdated = 'february, 6 2018'
m.ongetinfo = 'getinfo'
m.OnTaskStart = 'taskstart'
m.OnGetPageNumber = 'getpagenumber'
m.OnGetImageURL = 'getimageurl'
m.OnGetDirectoryPageNumber = 'getdirectorypagenumber'
m.OnGetNameAndLink = 'getnameandlink'
if name == 'TwistedHelScans' then m.ongetinfo = 'getinfo_ths'; end
return m
end
function Init()
local cat = 'English-Scanlation'
AddWebsiteModule('PowerManga', 'http://read.powermanga.org', cat)
AddWebsiteModule('Shoujosense', 'http://reader.shoujosense.com', cat)
AddWebsiteModule('OneTimeScans', 'http://otscans.com', cat)
AddWebsiteModule('SenseScans', 'http://reader.sensescans.com', cat)
AddWebsiteModule('Jaiminisbox', 'https://jaiminisbox.com', cat)
AddWebsiteModule('KireiCake', 'https://reader.kireicake.com', cat)
AddWebsiteModule('HelveticaScans', 'http://helveticascans.com', cat)
AddWebsiteModule('DokiFansubs', 'https://kobato.hologfx.com', cat)
AddWebsiteModule('AtelierDuNoir', 'http://atelierdunoir.org', cat)
AddWebsiteModule('WorldThree', 'http://www.slide.world-three.org', cat)
AddWebsiteModule('S2Scans', 'https://reader.s2smanga.com', cat)
AddWebsiteModule('HotChocolateScans', 'http://hotchocolatescans.com', cat)
AddWebsiteModule('LetItGoScans', 'http://reader.letitgo.scans.today', cat)
AddWebsiteModule('SeaOtterScans', 'https://reader.seaotterscans.com', cat)
AddWebsiteModule('AntisenseScans', 'http://antisensescans.com', cat)
AddWebsiteModule('TheCatScans', 'https://reader.thecatscans.com', cat)
AddWebsiteModule('DeathTollScans', 'https://reader.deathtollscans.net', cat)
AddWebsiteModule('MangaichiScan', 'http://mangaichiscans.mokkori.fr', cat)
AddWebsiteModule('ForgottenScans', 'http://reader.fos-scans.com', cat)
AddWebsiteModule('Riceballicious', 'http://riceballicious.info', cat)
AddWebsiteModule('PhoenixSerenade', 'https://reader.serenade.moe', cat)
AddWebsiteModule('VortexScans', 'https://reader.vortex-scans.com', cat)
AddWebsiteModule('RoseliaScanlations', 'http://reader.roseliascans.com', cat)
AddWebsiteModule('Yuri-ism', 'https://www.yuri-ism.net', cat)
AddWebsiteModule('SilentSkyScans', 'http://reader.silentsky-scans.net', cat)
AddWebsiteModule('BunnysScans', 'http://bns.shounen-ai.net', cat)
AddWebsiteModule('CanisMajorScans', 'http://cm-scans.shounen-ai.net', cat)
AddWebsiteModule('HoshikuzuuScans', 'http://hoshiscans.shounen-ai.net', cat)
AddWebsiteModule('YaoiIsLife', 'http://yaoislife.shounen-ai.net', cat)
AddWebsiteModule('FujoshiBitches', 'http://fujoshibitches.shounen-ai.net', cat)
AddWebsiteModule('TwistedHelScans', 'http://www.twistedhelscans.com', cat)
AddWebsiteModule('TapTrans', 'https://taptaptaptaptap.net', cat)
AddWebsiteModule('EvilFlowers', 'http://reader.evilflowers.com', cat)
AddWebsiteModule('IlluminatiManga', 'http://reader.manga-download.org', cat)
-- es-sc
cat = 'Spanish-Scanlation'
AddWebsiteModule('HoshinoFansub', 'http://manga.animefrontline.com', cat)
AddWebsiteModule('MenudoFansub', 'http://www.menudo-fansub.com', cat)
AddWebsiteModule('Pzykosis666HFansub', 'https://pzykosis666hfansub.com', cat)
AddWebsiteModule('SeinagiFansub', 'https://seinagi.org', cat)
AddWebsiteModule('SeinagiAdultoFansub', 'https://adulto.seinagi.org', cat)
AddWebsiteModule('SolitarioNoFansub', 'http://snf.mangaea.net', cat)
AddWebsiteModule('RavensScans', 'http://ravens-scans.com', cat)
AddWebsiteModule('KirishimaFansub', 'http://lector.kirishimafansub.net', cat)
AddWebsiteModule('NoraNoFansub', 'https://www.noranofansub.com', cat)
AddWebsiteModule('NeoProjectScan', 'http://npscan.mangaea.net', cat)
AddWebsiteModule('YamiTenshiNoFansub', 'http://lector.ytnofan.com', cat)
AddWebsiteModule('XAnimeSeduccion', 'http://xanime-seduccion.com', cat)
AddWebsiteModule('JokerFansub', 'http://reader.jokerfansub.com', cat)
AddWebsiteModule('PatyScans', 'http://lector.patyscans.com', cat)
AddWebsiteModule('PCNet', 'http://pcnet.patyscans.com', cat)
AddWebsiteModule('Nightow', 'http://nightow.net', cat)
AddWebsiteModule('TrueColorsScan', 'https://truecolorsscans.miocio.org', cat)
AddWebsiteModule('LoliVault', 'https://lolivault.net', cat)
AddWebsiteModule('Mangasubes', 'http://mangasubes.patyscans.com', cat)
end