Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
Jackett
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
Jackett
Commits
e4a47927
Commit
e4a47927
authored
Dec 21, 2015
by
some-guy-23
Browse files
Options
Downloads
Patches
Plain Diff
Fixed RevolutionTT so that login can use username/password (instead of cookie)
parent
226c27f9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Jackett/Indexers/RevolutionTT.cs
+15
-6
15 additions, 6 deletions
src/Jackett/Indexers/RevolutionTT.cs
with
15 additions
and
6 deletions
src/Jackett/Indexers/RevolutionTT.cs
+
15
−
6
View file @
e4a47927
...
@@ -20,12 +20,13 @@ namespace Jackett.Indexers
...
@@ -20,12 +20,13 @@ namespace Jackett.Indexers
{
{
public
class
RevolutionTT
:
BaseIndexer
,
IIndexer
public
class
RevolutionTT
:
BaseIndexer
,
IIndexer
{
{
private
string
LandingPageURL
{
get
{
return
SiteLink
+
"login.php"
;
}
}
private
string
LoginUrl
{
get
{
return
SiteLink
+
"takelogin.php"
;
}
}
private
string
LoginUrl
{
get
{
return
SiteLink
+
"takelogin.php"
;
}
}
private
string
SearchUrl
{
get
{
return
SiteLink
+
"browse.php"
;
}
}
private
string
SearchUrl
{
get
{
return
SiteLink
+
"browse.php"
;
}
}
new
ConfigurationData
Cookie
configData
new
ConfigurationData
BasicLogin
configData
{
{
get
{
return
(
ConfigurationData
Cookie
)
base
.
configData
;
}
get
{
return
(
ConfigurationData
BasicLogin
)
base
.
configData
;
}
set
{
base
.
configData
=
value
;
}
set
{
base
.
configData
=
value
;
}
}
}
...
@@ -39,7 +40,7 @@ namespace Jackett.Indexers
...
@@ -39,7 +40,7 @@ namespace Jackett.Indexers
logger
:
l
,
logger
:
l
,
p
:
ps
,
p
:
ps
,
downloadBase
:
"https://revolutiontt.me/download.php/"
,
downloadBase
:
"https://revolutiontt.me/download.php/"
,
configData
:
new
ConfigurationData
Cookie
())
configData
:
new
ConfigurationData
BasicLogin
())
{
{
/* Original RevolutionTT Categories -
/* Original RevolutionTT Categories -
...
@@ -151,8 +152,16 @@ namespace Jackett.Indexers
...
@@ -151,8 +152,16 @@ namespace Jackett.Indexers
{
{
configData
.
LoadValuesFromJson
(
configJson
);
configData
.
LoadValuesFromJson
(
configJson
);
var
result
=
await
RequestStringWithCookies
(
SearchUrl
,
configData
.
Cookie
.
Value
,
null
,
null
);
var
pairs
=
new
Dictionary
<
string
,
string
>
{
await
ConfigureIfOK
(
configData
.
Cookie
.
Value
,
result
.
Content
!=
null
&&
result
.
Content
.
Contains
(
"/logout.php"
),
()
=>
{
"username"
,
configData
.
Username
.
Value
},
{
"password"
,
configData
.
Password
.
Value
}
};
//--need to do an initial request to get PHP session cookie (any better way to do this?)
var
homePageLoad
=
await
RequestLoginAndFollowRedirect
(
LandingPageURL
,
new
Dictionary
<
string
,
string
>
{
},
null
,
true
,
null
,
SiteLink
);
var
result
=
await
RequestLoginAndFollowRedirect
(
LoginUrl
,
pairs
,
homePageLoad
.
Cookies
,
true
,
null
,
LoginUrl
);
await
ConfigureIfOK
(
result
.
Cookies
,
result
.
Content
!=
null
&&
result
.
Content
.
Contains
(
"/logout.php"
),
()
=>
{
{
CQ
dom
=
result
.
Content
;
CQ
dom
=
result
.
Content
;
var
messageEl
=
dom
[
".error"
];
var
messageEl
=
dom
[
".error"
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment