Kodi Community Forum

Full Version: Resurrect Blazetamer's Pornhub Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Looking at the updates.txt file in the plugin file, I see that it was last updated for Gotham.

We are now at Isengard, and only moments away from Jarvis.

I am not a professional programmer, but xml and python are more or less understandable to me. (C, Java and such make my brain hurt, though, lol)

Would you suggest I try to mod and update that plugin?

I could install Gotham on my laptop to test if it still works in that version and work forward. Any other suggestions on that front would be appreciated.

Or, just start from scratch?

P.S. I am really interested in learning in a general way how to build a plug-in for kodi that works with sites like this, where you have a filtered lit of some kind with a flashplayer on the a linked page. This just seemed like a good example that I thought might get some feed back.
Category Pages Factoids

Example url:

http://www.pornhub.com/video?c=3&o=tr&t=w

c=3 sets the category to "Amateur"
I won't list all the possible values here, because I am pretty sure some would be considered offensive / violate rules...

omit o= defaults to "Featured Recently"
o=tr filters the results to "Top Rated"
omit o= returns "Featured Recently"
o=mv filters the results to "Most Viewed"
o=tr filters the results to "Top Rated"
o=ht filters the results to "Hottest"
o=lg filters the results to "Longest"
o=cm filters the results to "Newest"

You can also filter by time period
omit t= defaults to "Monthly"
t=t filters the results to "Daily"
t=w filters the results to "Weekly"
t=m filters the results to "Monthly"
t=a filters the results to "All time"

I used chrome to figure out that:

for each thumbnail on the results page there is this:
...
<div>
<ul class="nf-videos videos row-4-thumbs">
<li class="videoblock alpha" id="61390061" _vkey="ph56436d4762f25">
<div class="wrap">
<div class="phimage">
<a href="/view_video.php?viewkey=ph56436d4762f25" title="" class="img" data-related-url="/video/ajax_related_video?vkey=ph56436d4762f25" data-title="Bite your tongue"></a>
<div class="img">
<a href="/view_video.php?viewkey=ph56436d4762f25" title="" class="img" data-related-url="/video/ajax_related_video?vkey=ph56436d4762f25" data-title="Bite your tongue">
<div class="marker-overlays">
<var class="duration">6:34</var>
<span class="hd-thumbnail">HD</span>
</div>
<img src="http://i1.cdn2a.image.pornhub.phncdn.com/m=eGcE8daaaa/videos/201511/11/61390061/original/7.jpg" alt="Bite your tongue" data-smallthumb="http://i1.cdn2a.image.pornhub.phncdn.com/m=eGcE8daaaa/videos/201511/11/61390061/original/7.jpg" data-mediumthumb="http://i1.cdn2a.image.pornhub.phncdn.com/m=eWdT8daaaa/videos/201511/11/61390061/original/7.jpg" class="js-videoThumb js-videoThumbFlip thumb" width="150" id="314034323661390061" data-video-id="61390061" data-prefix-id="314034323661390061" data-thumbs="16" data-path="http://i1.cdn2a.image.pornhub.phncdn.com/m=eWdT8daaaa/videos/201511/11/61390061/original/{index}.jpg" data-end="314034323661390061" title="" data-title="Bite your tongue">
</a>
</div>
<div class="add-to-playlist-icon display-none" style="display: none;">
<button type="button" data-title="Add to a Playlist" class="tooltipTrig open-playlist-link playlist-trigger" onclick="return false;" data-rel="ph56436d4762f25">+</button>
</div>
<div class="thumbnail-info-wrapper clearfix">
<span class="title"><a href="/view_video.php?viewkey=ph56436d4762f25" title="Bite your tongue">Bite your tongue</a></span>
<span class="views"><var>49,347</var> views</span>
<div class="rating-container up">
<div class="main-sprite icon"></div>
<div class="value">92%</div>
</div>
<span class="own-video-thumbnail main-sprite tooltipTrig" data-title="Video of verified member"></span>
<var class="added">4 days ago</var>
</div>
</div>
</div>
</li>

...

###
In this example the thumbnail can be loaded from

http://i1.cdn2a.image.pornhub.phncdn.com...inal/7.jpg

the url to play this video is:

http://www.pornhub.com/view_video.php?vi...36d4762f25
Player page factoids:

URL:
http://www.pornhub.com/view_video.php?vi...36d4762f25

On the player page is a flash player

I see this in the code, but haven't a clue if i can or how to make use of the info in Kodi

<div id="categorySuggestions" class="modalWrapper" data-category-url="/video/category_suggestions?vkey=ph56436d4762f25&amp;key=1447775057&amp;hash=a84411d91cc6504b91887e964b54c3df" data-vkey="ph56436d4762f25">

I am currently using chrome browser, but could install others if I need to.