Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
17a4ec3
v0.1
NotVinny Nov 25, 2015
b1d2031
v0.2
NotVinny Nov 27, 2015
c74345e
v0.2.1
NotVinny Nov 27, 2015
2d56fec
v0.3
NotVinny Dec 2, 2015
f3a66b3
v0.3.1
NotVinny Jan 31, 2016
ecae16f
v0.4
NotVinny Feb 7, 2016
104fcb6
Created Video Menu
NotVinny Jul 11, 2016
2f20fbb
Added porn stars to the video menu
NotVinny Jul 11, 2016
e0a79fd
Fixed porn star videos sorting problem
NotVinny Jul 11, 2016
b5ea6c6
Added channels to the video menu
NotVinny Jul 11, 2016
4065065
Adding comments for last commit
NotVinny Jul 11, 2016
31364f4
Added related videos to video menu
NotVinny Jul 12, 2016
506363d
Added playlists to video menu
NotVinny Jul 12, 2016
cc67e79
Added thumbnails for 2 video menu items
NotVinny Jul 12, 2016
b742411
Create README.md
NotVinny Jul 24, 2016
4095916
Added duration to ServiceCode
NotVinny Jul 25, 2016
31edc42
Added thumbnails
NotVinny Jul 25, 2016
912bdb5
Added actions
NotVinny Jul 25, 2016
9a112f2
Fixed some pagination issues
NotVinny Jul 25, 2016
3605c61
Added duration in one more spot
NotVinny Jul 25, 2016
5be7f47
Cleaned up video menu
NotVinny Jul 25, 2016
518feaf
Added video sub menu preferences
NotVinny Jul 25, 2016
72d71fc
Added Member Channel options
NotVinny Jul 25, 2016
cd756d4
Added "brains" to Member menu
NotVinny Jul 25, 2016
b968b73
Hide empty Playlists
NotVinny Jul 25, 2016
ce256e6
Added Member Porn Star subscriptions option
NotVinny Jul 26, 2016
68c3722
Minor pagination fix
NotVinny Jul 26, 2016
b9b6e1c
Added additional Member menu items
NotVinny Jul 26, 2016
b2cbf81
Added more accurate Member menu options
NotVinny Jul 26, 2016
4bfbf20
Couple more Member menu cleanup items
NotVinny Jul 26, 2016
615f15a
Changed how Member menu Preference overrides work
NotVinny Jul 27, 2016
2382570
Added the ability to choose accuracy of Videos and Playlists in Membe…
NotVinny Jul 27, 2016
aabc46e
Merge pull request #1 from NotVinny/dev
NotVinny Jul 28, 2016
8ed6a87
Begun implementing Shared Code
NotVinny Aug 1, 2016
2359787
More code into Shared Code
NotVinny Aug 2, 2016
f506207
Even more code into Shared Code
NotVinny Aug 2, 2016
a5a876e
Yet again, more code into Shared Code
NotVinny Aug 2, 2016
a75eee4
A couple minor tweaks
NotVinny Aug 2, 2016
527e181
Created GetMemberHoverMetaData function
NotVinny Sep 17, 2016
9dd7725
Simplified XPath selectors for video listing, added error routine
Dec 11, 2016
5b51cbd
Merge pull request #4 from desertwitch/v1.2
NotVinny Dec 22, 2016
a3dd958
Merge branch 'v1.2' of https://github.com/NotVinny/PornHub.bundle int…
NotVinny Dec 22, 2016
8370a11
Merge pull request #5 from NotVinny/v1.2
NotVinny Dec 22, 2016
7414873
Fixed related videos xpath
NotVinny May 13, 2017
65aed7a
Fixed video file parsing
NotVinny May 20, 2017
87efd4d
Merge pull request #6 from NotVinny/v1.2
NotVinny May 20, 2017
e5baa48
Fixed xPath for Related Videos.
NotVinny Aug 19, 2018
06970bb
Fixed thumbnail URL pattern.
NotVinny Aug 19, 2018
2140ffa
Fixed porn star xPath.
NotVinny Aug 19, 2018
372157e
Fixed xPath for playlists.
NotVinny Aug 19, 2018
8a18525
Fixed xPath for members.
NotVinny Aug 19, 2018
baeea49
Fixed xPath for category thumbnails.
NotVinny Aug 19, 2018
18c323f
Merge pull request #9 from NotVinny/v1.2
NotVinny Aug 20, 2018
b68decf
Fixed whitespace issues.
NotVinny Aug 20, 2018
db77d15
Merge pull request #10 from NotVinny/v1.2
NotVinny Aug 20, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
*.sql
*.sqlite

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
25 changes: 25 additions & 0 deletions Contents/Code/PHCategories.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from PHCommon import *

PH_CATEGORIES_URL = BASE_URL + '/categories'
PH_CATEGORIES_ALPHABETICAL_URL = PH_CATEGORIES_URL + '?o=al'

@route(ROUTE_PREFIX + '/categories')
def BrowseCategories(title=L("DefaultBrowseCategoriesTitle"), url = PH_CATEGORIES_ALPHABETICAL_URL):

# Create a dictionary of menu items
browseCategoriesMenuItems = OrderedDict()

# Get list of categories
categories = SharedCodeService.PHCategories.GetCategories(url)

# Loop through all categories
for category in categories:

# Add a menu item for the category
browseCategoriesMenuItems[category["title"]] = {
'function': BrowseVideos,
'functionArgs': {'url': BASE_URL + category["url"]},
'directoryObjectArgs': {'thumb': category["thumbnail"]}
}

return GenerateMenu(title, browseCategoriesMenuItems)
59 changes: 59 additions & 0 deletions Contents/Code/PHChannels.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
from PHCommon import *

PH_CHANNELS_URL = BASE_URL + '/channels'
PH_CHANNEL_SEARCH_URL = PH_CHANNELS_URL + '/search?channelSearch=%s'
MAX_CHANNELS_PER_PAGE = 36

@route(ROUTE_PREFIX + '/channels')
def BrowseChannels(title="DefaultBrowseChannelsTitle"):

# Create a dictionary of menu items
browseChannelsMenuItems = OrderedDict([
('Search Channels', {'function':SearchChannels, 'search':True, 'directoryObjectArgs':{'prompt':'Search for...','summary':'Enter Channel Search Terms'}}),
('Most Popular', {'function':ListChannels, 'functionArgs':{'url':SharedCodeService.PHCommon.AddURLParameters(PH_CHANNELS_URL, {'o':'rk'})}}),
('Trending', {'function':ListChannels, 'functionArgs':{'url':SharedCodeService.PHCommon.AddURLParameters(PH_CHANNELS_URL, {'o':'tr'})}}),
('Most Recent', {'function':ListChannels, 'functionArgs':{'url':SharedCodeService.PHCommon.AddURLParameters(PH_CHANNELS_URL, {'o':'mr'})}}),
('A-Z', {'function':ListChannels, 'functionArgs':{'url':SharedCodeService.PHCommon.AddURLParameters(PH_CHANNELS_URL, {'o':'al'})}})
])

return GenerateMenu(title, browseChannelsMenuItems)

@route(ROUTE_PREFIX + '/channels/list')
def ListChannels(title, url = PH_CHANNELS_URL, page=1):

# Create a dictionary of menu items
listChannelsMenuItems = OrderedDict()

# Add the page number into the query string
if (int(page) != 1):
url = SharedCodeService.PHCommon.AddURLParameters(url, {'page':str(page)})

# Get list of channels
channels = SharedCodeService.PHChannels.GetChannels(url)

# Loop through all channels
for channel in channels:

# Add a menu item for the channel
listChannelsMenuItems[channel["title"]] = {
'function': BrowseVideos,
'functionArgs': {'url': BASE_URL + channel["url"] + '/videos'},
'directoryObjectArgs': {'thumb': channel["thumbnail"]}
}

# There is a slight change that this will break... If the number of videos returned in total is divisible by MAX_VIDEOS_PER_PAGE with no remainder, there could possibly be no additional page after. This is unlikely though and I'm too lazy to handle it.
if (len(channels) == MAX_CHANNELS_PER_PAGE):
listChannelsMenuItems['Next Page'] = {'function':ListChannels, 'functionArgs':{'title':title, 'url':url, 'page':int(page)+1}, 'nextPage':True}

return GenerateMenu(title, listChannelsMenuItems)

@route(ROUTE_PREFIX + '/channels/search')
def SearchChannels(query):

# Format the query for use in PornHub's search
formattedQuery = SharedCodeService.PHCommon.FormatStringForSearch(query, "+")

try:
return ListChannels(title='Search Results for ' + query, url=PH_CHANNEL_SEARCH_URL % query)
except:
return ObjectContainer(header='Search Results', message="No search results found", no_cache=True)
Loading