Getting a 3rd party provider to work?

So you made CouchPotato even more awsome?
mbeltoft
Junior Member
Posts: 31
Joined: 19 Sep 2012 18:58
Has thanked: 4 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby mbeltoft » 11 Aug 2014 14:09

ok.. heres the log


Code: Select all

08-11 14:06:20DEBUG[o.core.notifications.core] Cleaning messages
08-11 14:06:20DEBUG[o.core.notifications.core] Done cleaning messages
08-11 14:06:22INFO[hpotato.core.plugins.base] Opening url: get https://api.couchpota.to/search/pirate/?limit=5, data: []
08-11 14:06:22INFO[hpotato.core.plugins.base] Opening url: get http://www.omdbapi.com/?y=&t=pirate, data: []
08-11 14:06:22DEBUG[hpotato.core.plugins.base] Setting cache omdbapi.cache.pirate
08-11 14:06:22INFO[ie.providers.info.omdbapi] Found: Pirate Radio (2009)
08-11 14:06:22DEBUG[hpotato.core.plugins.base] Setting cache fbd44acbaee7a967d8cfbce659b217de
08-11 14:06:22DEBUG[   couchpotato.core.event] Return modified results for info.search
08-11 14:06:23INFO[hpotato.core.plugins.base] Opening url: get https://api.couchpota.to/search/pirate+fa/?limit=5, data: []
08-11 14:06:23INFO[hpotato.core.plugins.base] Opening url: get http://www.omdbapi.com/?y=&t=pirate+fa, data: []
08-11 14:06:23DEBUG[hpotato.core.plugins.base] Setting cache omdbapi.cache.pirate fa
08-11 14:06:24DEBUG[hpotato.core.plugins.base] Setting cache a8ae3c885714db61d77d05c269af066f
08-11 14:06:24DEBUG[   couchpotato.core.event] Return modified results for info.search
08-11 14:06:31INFO[hpotato.core.plugins.base] Opening url: get https://api.couchpota.to/ismovie/tt2483260/, data: []
08-11 14:06:31DEBUG[hpotato.core.plugins.base] Setting cache 9bac6c2a17022bb36a9991486a2dfa4d
08-11 14:06:31DEBUG[e.providers.info.fanarttv] Getting Extra Artwork from Fanart.tv...
08-11 14:06:31INFO[hpotato.core.plugins.base] Opening url: get https://api.couchpota.to/info/tt2483260/, data: []
08-11 14:06:31DEBUG[providers.info.themoviedb] Getting info: tmdb.cache.tt2483260
08-11 14:06:31INFO[hpotato.core.plugins.base] Opening url: get http://webservice.fanart.tv/v3/movies/tt2483260?api_key=xxx
08-11 14:06:31INFO[hpotato.core.plugins.base] Opening url: get http://www.omdbapi.com/?i=tt2483260, data: []
08-11 14:06:31DEBUG[hpotato.core.plugins.base] Setting cache 28cae52d5ef706e82b06cb6ebe0e83dc
08-11 14:06:31DEBUG[hpotato.core.plugins.base] Setting cache omdbapi.cache.tt2483260
08-11 14:06:31INFO[ie.providers.info.omdbapi] Found: The Pirate Fairy (2014)
08-11 14:06:32DEBUG[hpotato.core.plugins.base] Setting cache 99bc376a43aaa1a6413b59006e54bbbc
08-11 14:06:32DEBUG[e.providers.info.fanarttv] Found images for The Pirate Fairy
08-11 14:06:32DEBUG[hpotato.core.plugins.base] Setting cache tmdb.cache.175112
08-11 14:06:32DEBUG[hpotato.core.plugins.base] Setting cache tmdb.cache.tt2483260
08-11 14:06:32DEBUG[   couchpotato.core.event] Return modified results for movie.info
08-11 14:06:32DEBUG[e.providers.info.fanarttv] Getting Extra Artwork from Fanart.tv...
08-11 14:06:32DEBUG[o.core.notifications.core] Notifying frontend
08-11 14:06:32DEBUG[hpotato.core.plugins.base] Getting cache 99bc376a43aaa1a6413b59006e54bbbc
08-11 14:06:32DEBUG[e.providers.info.fanarttv] Found images for The Pirate Fairy
08-11 14:06:32DEBUG[hpotato.core.plugins.base] Getting cache omdbapi.cache.tt2483260
08-11 14:06:32DEBUG[hpotato.core.plugins.base] Getting cache 28cae52d5ef706e82b06cb6ebe0e83dc
08-11 14:06:32INFO[ie.providers.info.omdbapi] Found: The Pirate Fairy (2014)
08-11 14:06:32DEBUG[o.core.notifications.core] Done notifying frontend
08-11 14:06:32DEBUG[hpotato.core.plugins.base] Getting cache tmdb.cache.tt2483260
08-11 14:06:32DEBUG[   couchpotato.core.event] Return modified results for movie.info
08-11 14:06:32DEBUG[to.core.media.movie._base] Adding titles: [u'The Pirate Fairy', u'Tinker Bell and the Pirate Fairy', u'Tinker Bell and the Quest for the Queen', u'Clochette et la f\xe9e pirate', u'Tinker Bell 5 - The Pirate Fairy', u'I Tinkerbell kai oi Peirates', u'\u0397 \u03a4\u03af\u03bd\u03ba\u03b5\u03c1\u03bc\u03c0\u03b5\u03bb \u03ba\u03b1\u03b9 \u03bf\u03b9 \u03a0\u03b5\u03b9\u03c1\u03b1\u03c4\u03ad\u03c2', u'Tinker Bell 6: The Pirate Fairy', u'F\xe9e Clochette et la f\xe9e pirate', u'Tingeling och Piratfen', u'Klokkeblomst og piratfeen']
08-11 14:06:32DEBUG[to.core.media._base.media] Changing status for The Pirate Fairy
08-11 14:06:32INFO[hpotato.core.plugins.base] Opening url: get https://api.couchpota.to/eta/tt2483260/, data: []
08-11 14:06:32DEBUG[hpotato.core.plugins.base] Setting cache b2ea29bf1a09a9cec6ef7e926c224d0c
08-11 14:06:32DEBUG[iders.info.couchpotatoapi] Found ETA for tt2483260: {u'dvd': 1396303200, u'expires': 1408014035, u'theater': 0, u'bluray': True}
08-11 14:06:32DEBUG[o.core.notifications.core] Notifying frontend
08-11 14:06:32DEBUG[o.core.notifications.core] Done notifying frontend
08-11 14:06:32INFO[core.media.movie.searcher] Search for The Pirate Fairy in 1080p ignoring ETA
08-11 14:06:32INFO[hpotato.core.plugins.base] Opening url: get http://nxtgn.org/browse.php?search=the+pirate+fairy+2014&cat=0&incldead=0&modes=&c9=1&c33=1&c38=1&c43=1&c47=1, data: []
08-11 14:06:32DEBUG[hpotato.core.plugins.base] Setting cache 7b4590a98722b93f0cd242cc135171d8
08-11 14:06:32INFO[                   nxtgen] no torrent table found from nxtgn
08-11 14:06:32DEBUG[core.media.movie.searcher] Nothing found for The Pirate Fairy in 1080p
08-11 14:06:32INFO[core.media.movie.searcher] Search for The Pirate Fairy in 1080p ignoring ETA
08-11 14:06:32DEBUG[hpotato.core.plugins.base] Getting cache 7b4590a98722b93f0cd242cc135171d8
08-11 14:06:32INFO[                   nxtgen] no torrent table found from nxtgn
08-11 14:06:32DEBUG[core.media.movie.searcher] Nothing found for The Pirate Fairy in 1080p
08-11 14:06:32DEBUG[o.core.notifications.core] Notifying frontend
08-11 14:06:32DEBUG[o.core.notifications.core] Done notifying frontend
08-11 14:06:32DEBUG[o.core.notifications.core] Notifying frontend
08-11 14:06:32DEBUG[o.core.notifications.core] Done notifying frontend
08-11 14:06:34DEBUG[o.core.notifications.core] Getting messages with id: 95d2df85-ba19-4b70-a15e-524387e0188a
08-11 14:06:34DEBUG[o.core.notifications.core] Returning for 95d2df85-ba19-4b70-a15e-524387e0188a 3 messages
08-11 14:06:35DEBUG[o.core.notifications.core] Cleaning messages
08-11 14:06:35DEBUG[o.core.notifications.core] Done cleaning messages
08-11 14:06:35DEBUG[o.core.notifications.core] Getting messages with id: f39cdd2c-59b7-4079-83f7-b5a235c617b6
08-11 14:06:35DEBUG[o.core.notifications.core] Returning for f39cdd2c-59b7-4079-83f7-b5a235c617b6 0 messages

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby clinton.hall » 11 Aug 2014 14:15

ok.. the place this fails is

Code: Select all

resultsTable = html.find('div', attrs = {'id' : 'torrent-table-wrapper'})

basically, there is no "torrent-table-wrapper" found...

I can only assume the format of output from this site has changed.

you could open the search url in a browser, then view source to get the html data and see what format these tables have... it is probably taht all results parsing will need to be changed.

mbeltoft
Junior Member
Posts: 31
Joined: 19 Sep 2012 18:58
Has thanked: 4 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby mbeltoft » 11 Aug 2014 14:25

hmm strange. Heres the the interesting part of the search result and as you can see in line 3 there is a "torrent-table-wrapper"

Code: Select all

<h2>Resultater efter "the pirate fairy 2014"</h2>
<p align="center"><b>&lt;&lt;&nbsp;Forrige</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>N&aelig;ste&nbsp;&gt;&gt;</b><br /><b>1&nbsp;-&nbsp;15</b></p>
<div id="torrent-table-wrapper"><div id="torrent-wrapper">
<div class="torrent-icon"><a href="browse.php?c47=1&amp;c9=1&amp;c38=1&amp;c43=1&amp;c33=1&amp;search=the+pirate+fairy+2014&amp;sort=category &d=ASC" title="Kategori"></a></div><div id="torrent-udgivelse-users"><a href="browse.php?c47=1&amp;c9=1&amp;c38=1&amp;c43=1&amp;c33=1&amp;search=the+pirate+fairy+2014&amp;sort=name&d=ASC" title="Udgivelse"></a></div>
<div id="torrent-info5"><a href="#" title=""></a></div>
<div id="torrent-download"><a href="#"  title="Download"></a></div>
<div id="torrent-bm"><a href="#" title="Opret bogmærke"></a></div>
<div id="torrent-files" title="Antal filer"><a href="browse.php?c47=1&amp;c9=1&amp;c38=1&amp;c43=1&amp;c33=1&amp;search=the+pirate+fairy+2014&amp;sort=numfiles"></a></div><div id="torrent-comment" title="Kommentarer"><a href="browse.php?c47=1&amp;c9=1&amp;c38=1&amp;c43=1&amp;c33=1&amp;search=the+pirate+fairy+2014&amp;sort=comments"></a></div><div id="torrent-added" title="Tilføjet"><a href="browse.php?c47=1&amp;c9=1&amp;c38=1&amp;c43=1&amp;c33=1&amp;search=the+pirate+fairy+2014&amp;sort=added"></a></div>
<div id="torrent-size" title="Størrelse"><a href="browse.php?c47=1&amp;c9=1&amp;c38=1&amp;c43=1&amp;c33=1&amp;search=the+pirate+fairy+2014&amp;sort=size"></a></div>
<div id="torrent-seeders" title="Antal seeders"><a href="browse.php?c47=1&amp;c9=1&amp;c38=1&amp;c43=1&amp;c33=1&amp;search=the+pirate+fairy+2014&amp;sort=seeders"></a></div>
<div id="torrent-leechers" title="Antal leechers"><a href="browse.php?c47=1&amp;c9=1&amp;c38=1&amp;c43=1&amp;c33=1&amp;search=the+pirate+fairy+2014&amp;sort=leechers"></a></div>
</div><div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=17" data-id2="460002.jpg"><img border='0' src='styles/dark/caticons/dvd-dk.png' alt='Danish DVD-R' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=460002"id=460002" title="The.Pirate.Fairy.2014.DK.ENG.NTSC.DVDR-RAPiDCOWS"><strong style="line-height:5px;">The.Pirate.Fairy.2014.DK.ENG.NTSC.DVDR-RAPiDCOWS </strong> </a><p>(RAPiDCOWS - You name it, We provide it!) </p></div> <div id="infolink"><div id="imdb-link"><a href="http://anonym.to?http://www.imdb.com/title/tt2483260" target="_blank"><img src="/pic/imdb.png"></a></div></div>
<div id="torrent-download"><a class="index" href="download.php?id=460002"><div id="browse-mode-F2L" title="Free 2 Leech"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=460002><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=460002&amp;filelist=1#filelist">2</a></b></div>
<div id="torrent-comment"><b><a href="details.php?id=460002#startcomments">21</a></b></div>
<div id="torrent-added"><nobr>30-06-2014<br />16:03:23</nobr></div>
<div id="torrent-size">4.338<br>GB</div>
<div id="torrent-seeders"><b><a class="864" href="details.php?id=460002&amp;dllist=1#seeders">864</a></b></div><div id="torrent-leechers"><b><a class="2" href="details.php?id=460002&amp;dllist=1#leechers">2</a></b></div>
</div>
<div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=43" data-id2="459625.jpg"><img border='0' src='styles/dark/caticons/NG-WWW-HD.png' alt='NG WWW HD' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=459625"id=459625" title="The.Pirate.Fairy.2014.DK.ENG.1080p.BluRay.x264-RAPiDCOWS"><strong style="line-height:5px;">The.Pirate.Fairy.2014.DK.ENG.1080p.BluRay.x264-RAPiDCOWS </strong> </a><p>(RAPiDCOWS - DANSK &amp; ENG tale - You name it, We provide it!) </p></div> <div id="infolink"><div id="imdb-link"><a href="http://anonym.to?http://www.imdb.com/title/tt2483260" target="_blank"><img src="/pic/imdb.png"></a></div></div>
<div id="torrent-download"><a class="index" href="download.php?id=459625"><div id="browse-mode-F2L" title="Free 2 Leech"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=459625><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=459625&amp;filelist=1#filelist">3</a></b></div>
<div id="torrent-comment"><b><a href="details.php?id=459625#startcomments">18</a></b></div>
<div id="torrent-added"><nobr>29-06-2014<br />18:16:29</nobr></div>
<div id="torrent-size">5.193<br>GB</div>
<div id="torrent-seeders"><b><a class="259" href="details.php?id=459625&amp;dllist=1#seeders">259</a></b></div><div id="torrent-leechers">0</div>
</div>
<div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=43" data-id2="459624.jpg"><img border='0' src='styles/dark/caticons/NG-WWW-HD.png' alt='NG WWW HD' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=459624"id=459624" title="The.Pirate.Fairy.2014.DK.ENG.720p.BluRay.x264-RAPiDCOWS"><strong style="line-height:5px;">The.Pirate.Fairy.2014.DK.ENG.720p.BluRay.x264-RAPiDCOWS </strong> </a><p>(RAPiDCOWS - DANSK &amp; ENG tale - You name it, We provide it!) </p></div> <div id="infolink"><div id="imdb-link"><a href="http://anonym.to?http://www.imdb.com/title/tt2483260" target="_blank"><img src="/pic/imdb.png"></a></div></div>
<div id="torrent-download"><a class="index" href="download.php?id=459624"><div id="browse-mode-F2L" title="Free 2 Leech"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=459624><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=459624&amp;filelist=1#filelist">3</a></b></div>
<div id="torrent-comment">0</div>
<div id="torrent-added"><nobr>29-06-2014<br />18:16:00</nobr></div>
<div id="torrent-size">3.004<br>GB</div>
<div id="torrent-seeders"><b><a class="55" href="details.php?id=459624&amp;dllist=1#seeders">55</a></b></div><div id="torrent-leechers">0</div>
</div>
<div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=38" data-id2="459333.jpg"><img border='0' src='styles/dark/caticons/NG-Film-HD.png' alt='NG Film HD' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=459333"id=459333" title="The.Pirate.Fairy.2014.DKsubs.1080p.BluRay.x264-GenX"><strong style="line-height:5px;">The.Pirate.Fairy.2014.DKsubs.1080p.BluRay.x264-GenX </strong> </a><p>(GenerationX - DKs #1!) </p></div> <div id="infolink"><div id="imdb-link"><a href="http://anonym.to?http://www.imdb.com/title/tt2483260" target="_blank"><img src="/pic/imdb.png"></a></div></div>
<div id="torrent-download"><a class="index" href="download.php?id=459333"><div id="browse-mode-F2L" title="Free 2 Leech"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=459333><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=459333&amp;filelist=1#filelist">5</a></b></div>
<div id="torrent-comment">0</div>
<div id="torrent-added"><nobr>28-06-2014<br />23:20:49</nobr></div>
<div id="torrent-size">4.677<br>GB</div>
<div id="torrent-seeders"><b><a class="105" href="details.php?id=459333&amp;dllist=1#seeders">105</a></b></div><div id="torrent-leechers"><b><a class="6" href="details.php?id=459333&amp;dllist=1#leechers">6</a></b></div>
</div>
<div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=38" data-id2="459332.jpg"><img border='0' src='styles/dark/caticons/NG-Film-HD.png' alt='NG Film HD' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=459332"id=459332" title="The.Pirate.Fairy.2014.DKsubs.720p.BluRay.x264-GenX"><strong style="line-height:5px;">The.Pirate.Fairy.2014.DKsubs.720p.BluRay.x264-GenX </strong> </a><p>(GenerationX - DKs #1!) </p></div> <div id="infolink"><div id="imdb-link"><a href="http://anonym.to?http://www.imdb.com/title/tt2483260" target="_blank"><img src="/pic/imdb.png"></a></div></div>
<div id="torrent-download"><a class="index" href="download.php?id=459332"><div id="browse-mode-F2L" title="Free 2 Leech"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=459332><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=459332&amp;filelist=1#filelist">5</a></b></div>
<div id="torrent-comment"><b><a href="details.php?id=459332#startcomments">3</a></b></div>
<div id="torrent-added"><nobr>28-06-2014<br />23:20:35</nobr></div>
<div id="torrent-size">2.474<br>GB</div>
<div id="torrent-seeders"><b><a class="58" href="details.php?id=459332&amp;dllist=1#seeders">58</a></b></div><div id="torrent-leechers"><b><a class="4" href="details.php?id=459332&amp;dllist=1#leechers">4</a></b></div>
</div>
<div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=9" data-id2=""><img border='0' src='styles/dark/caticons/hd.png' alt='HD' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=459322"id=459322" title="The.Pirate.Fairy.2014.NORWEGiAN.720p.BluRay.x264-RCDiVX"><strong style="line-height:5px;">The.Pirate.Fairy.2014.NORWEGiAN.720p.BluRay.x264-RCDiVX </strong> </a><p> </p></div> <div id="infolink"><div id="imdb-link"><a href="http://anonym.to?http://www.imdb.com/title/tt2483260" target="_blank"><img src="/pic/imdb.png"></a></div></div>
<div id="torrent-download"><a class="index" href="download.php?id=459322"><div id="browse-mode-normal" title="Normal download tæller"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=459322><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=459322&amp;filelist=1#filelist">51</a></b></div>
<div id="torrent-comment">0</div>
<div id="torrent-added"><nobr>28-06-2014<br />22:44:25</nobr></div>
<div id="torrent-size">2.207<br>GB</div>
<div id="torrent-seeders"><b><a class="1" href="details.php?id=459322&amp;dllist=1#seeders">1</a></b></div><div id="torrent-leechers">0</div>
</div>
<div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=9" data-id2=""><img border='0' src='styles/dark/caticons/hd.png' alt='HD' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=459321"id=459321" title="The.Pirate.Fairy.2014.DANiSH.1080p.BluRay.x264-RCDiVX"><strong style="line-height:5px;">The.Pirate.Fairy.2014.DANiSH.1080p.BluRay.x264-RCDiVX </strong> </a><p> </p></div> <div id="infolink"><div id="imdb-link"><a href="http://anonym.to?http://www.imdb.com/title/tt2483260" target="_blank"><img src="/pic/imdb.png"></a></div></div>
<div id="torrent-download"><a class="index" href="download.php?id=459321"><div id="browse-mode-normal" title="Normal download tæller"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=459321><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=459321&amp;filelist=1#filelist">98</a></b></div>
<div id="torrent-comment">0</div>
<div id="torrent-added"><nobr>28-06-2014<br />22:44:11</nobr></div>
<div id="torrent-size">4.415<br>GB</div>
<div id="torrent-seeders"><b><a class="25" href="details.php?id=459321&amp;dllist=1#seeders">25</a></b></div><div id="torrent-leechers"><b><a class="2" href="details.php?id=459321&amp;dllist=1#leechers">2</a></b></div>
</div>
<div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=9" data-id2=""><img border='0' src='styles/dark/caticons/hd.png' alt='HD' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=459303"id=459303" title="The.Pirate.Fairy.2014.SWEDiSH.1080p.BluRay.x264-RCDiVX"><strong style="line-height:5px;">The.Pirate.Fairy.2014.SWEDiSH.1080p.BluRay.x264-RCDiVX </strong> </a><p> </p></div> <div id="infolink"><div id="imdb-link"><a href="http://anonym.to?http://www.imdb.com/title/tt2483260" target="_blank"><img src="/pic/imdb.png"></a></div></div>
<div id="torrent-download"><a class="index" href="download.php?id=459303"><div id="browse-mode-normal" title="Normal download tæller"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=459303><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=459303&amp;filelist=1#filelist">97</a></b></div>
<div id="torrent-comment">0</div>
<div id="torrent-added"><nobr>28-06-2014<br />21:53:53</nobr></div>
<div id="torrent-size">4.415<br>GB</div>
<div id="torrent-seeders"><b><a class="1" href="details.php?id=459303&amp;dllist=1#seeders">1</a></b></div><div id="torrent-leechers">0</div>
</div>
<div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=9" data-id2=""><img border='0' src='styles/dark/caticons/hd.png' alt='HD' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=459251"id=459251" title="The.Pirate.Fairy.2014.SWEDiSH.720p.BluRay.x264-RCDiVX"><strong style="line-height:5px;">The.Pirate.Fairy.2014.SWEDiSH.720p.BluRay.x264-RCDiVX </strong> </a><p> </p></div> <div id="infolink"><div id="imdb-link"><a href="http://anonym.to?http://www.imdb.com/title/tt2483260" target="_blank"><img src="/pic/imdb.png"></a></div></div>
<div id="torrent-download"><a class="index" href="download.php?id=459251"><div id="browse-mode-normal" title="Normal download tæller"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=459251><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=459251&amp;filelist=1#filelist">51</a></b></div>
<div id="torrent-comment">0</div>
<div id="torrent-added"><nobr>28-06-2014<br />18:19:32</nobr></div>
<div id="torrent-size">2.207<br>GB</div>
<div id="torrent-seeders">0</div>
<div id="torrent-leechers"><b><a class="1" href="details.php?id=459251&amp;dllist=1#leechers">1</a></b></div>
</div>
<div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=9" data-id2=""><img border='0' src='styles/dark/caticons/hd.png' alt='HD' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=459250"id=459250" title="The.Pirate.Fairy.2014.DANiSH.720p.BluRay.x264-RCDiVX"><strong style="line-height:5px;">The.Pirate.Fairy.2014.DANiSH.720p.BluRay.x264-RCDiVX </strong> </a><p> </p></div> <div id="infolink"><div id="imdb-link"><a href="http://anonym.to?http://www.imdb.com/title/tt2483260" target="_blank"><img src="/pic/imdb.png"></a></div></div>
<div id="torrent-download"><a class="index" href="download.php?id=459250"><div id="browse-mode-normal" title="Normal download tæller"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=459250><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=459250&amp;filelist=1#filelist">50</a></b></div>
<div id="torrent-comment"><b><a href="details.php?id=459250#startcomments">1</a></b></div>
<div id="torrent-added"><nobr>28-06-2014<br />18:12:58</nobr></div>
<div id="torrent-size">2.207<br>GB</div>
<div id="torrent-seeders"><b><a class="46" href="details.php?id=459250&amp;dllist=1#seeders">46</a></b></div><div id="torrent-leechers"><b><a class="1" href="details.php?id=459250&amp;dllist=1#leechers">1</a></b></div>
</div>
<div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=6" data-id2=""><img border='0' src='styles/dark/caticons/dvd5.png' alt='DVD-R' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=449279"id=449279" title="The.Pirate.Fairy.2014.NTSC.DVDR-JFKDVD"><strong style="line-height:5px;">The.Pirate.Fairy.2014.NTSC.DVDR-JFKDVD </strong> </a><p> </p></div> <div id="infolink"><div id="imdb-link"><a href="http://anonym.to?http://www.imdb.com/title/tt2483260" target="_blank"><img src="/pic/imdb.png"></a></div></div>
<div id="torrent-download"><a class="index" href="download.php?id=449279"><div id="browse-mode-normal" title="Normal download tæller"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=449279><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=449279&amp;filelist=1#filelist">98</a></b></div>
<div id="torrent-comment"><b><a href="details.php?id=449279#startcomments">1</a></b></div>
<div id="torrent-added"><nobr>02-06-2014<br />00:38:23</nobr></div>
<div id="torrent-size">4.462<br>GB</div>
<div id="torrent-seeders"><b><a class="1" href="details.php?id=449279&amp;dllist=1#seeders">1</a></b></div><div id="torrent-leechers">0</div>
</div>
<div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=47" data-id2=""><img border='0' src='styles/dark/caticons/3d.png' alt='3D' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=442952"id=442952" title="The Pirate Fairy 3D 2014 1080p H-OU HDTV x264 AC-3 vice"><strong style="line-height:5px;">The Pirate Fairy 3D 2014 1080p H-OU HDTV x264 AC-3 vice </strong> </a><p>(SUG SUG SUG) </p></div> <div id="infolink"></div>
<div id="torrent-download"><a class="index" href="download.php?id=442952"><div id="browse-mode-normal" title="Normal download tæller"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=442952><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=442952&amp;filelist=1#filelist">1</a></b></div>
<div id="torrent-comment">0</div>
<div id="torrent-added"><nobr>15-05-2014<br />14:24:58</nobr></div>
<div id="torrent-size">4.708<br>GB</div>
<div id="torrent-seeders"><b><a class="5" href="details.php?id=442952&amp;dllist=1#seeders">5</a></b></div><div id="torrent-leechers">0</div>
</div>
<div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=9" data-id2=""><img border='0' src='styles/dark/caticons/hd.png' alt='HD' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=421510"id=421510" title="The.Pirate.Fairy.2014.1080p.BluRay.x264-ROVERS"><strong style="line-height:5px;">The.Pirate.Fairy.2014.1080p.BluRay.x264-ROVERS </strong> </a><p> </p></div> <div id="infolink"><div id="imdb-link"><a href="http://anonym.to?http://www.imdb.com/title/tt2483260" target="_blank"><img src="/pic/imdb.png"></a></div></div>
<div id="torrent-download"><a class="index" href="download.php?id=421510"><div id="browse-mode-normal" title="Normal download tæller"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=421510><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=421510&amp;filelist=1#filelist">99</a></b></div>
<div id="torrent-comment">0</div>
<div id="torrent-added"><nobr>21-03-2014<br />06:50:45</nobr></div>
<div id="torrent-size">4.440<br>GB</div>
<div id="torrent-seeders"><b><a class="3" href="details.php?id=421510&amp;dllist=1#seeders">3</a></b></div><div id="torrent-leechers">0</div>
</div>
<div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=9" data-id2=""><img border='0' src='styles/dark/caticons/hd.png' alt='HD' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=421508"id=421508" title="The.Pirate.Fairy.2014.720p.BluRay.x264-ROVERS"><strong style="line-height:5px;">The.Pirate.Fairy.2014.720p.BluRay.x264-ROVERS </strong> </a><p> </p></div> <div id="infolink"><div id="imdb-link"><a href="http://anonym.to?http://www.imdb.com/title/tt2483260" target="_blank"><img src="/pic/imdb.png"></a></div></div>
<div id="torrent-download"><a class="index" href="download.php?id=421508"><div id="browse-mode-normal" title="Normal download tæller"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=421508><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=421508&amp;filelist=1#filelist">51</a></b></div>
<div id="torrent-comment">0</div>
<div id="torrent-added"><nobr>21-03-2014<br />06:33:57</nobr></div>
<div id="torrent-size">2.184<br>GB</div>
<div id="torrent-seeders"><b><a class="5" href="details.php?id=421508&amp;dllist=1#seeders">5</a></b></div><div id="torrent-leechers">0</div>
</div>
<div id="torrent-std"><div class="torrent-icon"><a href="browse.php?cat=5" data-id2=""><img border='0' src='styles/dark/caticons/xvid.png' alt='XviD' /></a></div><div id="torrent-udgivelse2-users"><a href="details.php?id=421504"id=421504" title="The.Pirate.Fairy.2014.BDRip.x264-ROVERS"><strong style="line-height:5px;">The.Pirate.Fairy.2014.BDRip.x264-ROVERS </strong> </a><p> </p></div> <div id="infolink"><div id="imdb-link"><a href="http://anonym.to?http://www.imdb.com/title/tt2483260" target="_blank"><img src="/pic/imdb.png"></a></div></div>
<div id="torrent-download"><a class="index" href="download.php?id=421504"><div id="browse-mode-normal" title="Normal download tæller"></div></a></div>
<div id="torrent-bm"><a href=bookmark.php?torrent=421504><img border=0 src=/pic/bookmark3.png alt=Bookmark title=Bookmark></a></div>
<div id="torrent-files"><b><a href="details.php?id=421504&amp;filelist=1#filelist">58</a></b></div>
<div id="torrent-comment">0</div>
<div id="torrent-added"><nobr>21-03-2014<br />06:23:47</nobr></div>
<div id="torrent-size">794.14<br>MB</div>
<div id="torrent-seeders"><b><a class="3" href="details.php?id=421504&amp;dllist=1#seeders">3</a></b></div><div id="torrent-leechers">0</div>
</div>
</div>

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby clinton.hall » 11 Aug 2014 14:34

so the only other thing here is that the url is not returning the data correctly in the python script, or the beautiful soup conversion is not working correctly.... really not sure what is going on here.

who originally created this script?

mbeltoft
Junior Member
Posts: 31
Joined: 19 Sep 2012 18:58
Has thanked: 4 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby mbeltoft » 11 Aug 2014 14:41

I got it from here: https://github.com/Xirg/cps.nxtgn

i found it after seeing a discussion on the nxtgen forums about it not working anymore after CP changed folder format and then I thought i would have a look at it.

is it possible to get a output of what is returned to the script from the search url? and also how it looks after BS have converted it

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby clinton.hall » 11 Aug 2014 14:46

Try this... no guarantees... and the logs may look really cluttered.

Code: Select all

# credits goes to https://github.com/TjaLfE/cps.nextgen

from bs4 import BeautifulSoup
from couchpotato.core.helpers.encoding import simplifyString, tryUrlencode
from couchpotato.core.helpers.variable import tryInt
from couchpotato.core.logger import CPLog
from couchpotato.core.media._base.providers.torrent.base import TorrentProvider
from couchpotato.core.media.movie.providers.base import MovieProvider
import traceback
import cookielib
import urllib2
import time

log = CPLog(__name__)


class nxtgn(TorrentProvider, MovieProvider):

   urls = {
      'test' : 'https://nxtgn.org/',
      'login_page' : 'https://nxtgn.org/login.php',
      'login' : 'https://nxtgn.org/takelogin.php',
      'detail' : 'https://nxtgn.org/details.php?id=%s',
      'search' : 'http://nxtgn.org/browse.php?search=%s&cat=0&incldead=0&modes=%s',
      'download' : 'https://nxtgn.org/download.php?id=%s',
   }
   
   cat_ids = [
      ([9, 33, 38, 43, 47], ['720p', '1080p']),
      ([6, 16, 17, 25, 28], ['dvdr']),
      ([5], ['cam', 'ts', 'dvdrip', 'tc', 'r5', 'scr', 'brrip']),
   ]


   http_time_between_calls = 1 #seconds

   cat_backup_id = None

   def _searchOnTitle(self, title, movie, quality, results):

      #correct category search
      categories= ""
      for x in self.getCatId(quality):
         categories+='&c' + str(x) + '=1'

      searchurl = self.urls['search'] % (tryUrlencode('%s %s' % (title.replace(':', ''), movie['info']['year'])), categories)
      data = self.getHTMLData(searchurl).decode('iso-8859-1')
     
     
      if data:
     
         html = BeautifulSoup(data)
         log.info(html)                       
         try:
            resultsTable = html.find('div', attrs = {'id' : 'torrent-table-wrapper'})
            if not resultsTable:
               log.info('no torrent table found from nxtgn')
               return
           
            # Collecting entries
            entries_std = resultsTable.find_all('div' , attrs = {'id' : 'torrent-std'})
            entries_sticky = resultsTable.find_all('div' , attrs = {'id' : 'torrent-sticky'})
            entries = entries_std + entries_sticky
           
            if not len(entries) > 0:
               log.info('no entries found on nxtgn torrent table')
            else:
               log.info('%s entries found from nxtgn' % str(len(entries)))
               # Extracting results from entries
               for result in entries:
                 
                  torrentId = (((result.find('div', attrs = {'id' :'torrent-download'})).find('a'))['href']).replace('download.php?id=','')
                  torrentName = ((result.find('div', attrs = {'id' :'torrent-udgivelse2-users'})).find('a'))['title']
                 
                  # Name trimming
                  torrentName = torrentName.replace("3D.", "")
                  torrentName = torrentName.replace("DTS7.1.", "")
                  torrentName = torrentName.replace('EXTENDED.CUT.','')
                  torrentName = torrentName.replace('UNRATED.CUT.','')
                  torrentName = torrentName.replace('THEATRICAL.CUT.','')
                  torrentName = torrentName.replace('EXTENDED.','')
                  torrentName = torrentName.replace('UNRATED.','')
                  torrentName = torrentName.replace('THEATRICAL.','')
                  torrentName = torrentName.replace('DIRECTORS.CUT.','')
                  torrentName = torrentName.replace('Extended.Cut.','')
                  torrentName = torrentName.replace('Unrated.Cut.','')
                  torrentName = torrentName.replace('Theatrical.Cut.','')
                  torrentName = torrentName.replace('Extended.','')
                  torrentName = torrentName.replace('Unrated.','')
                  torrentName = torrentName.replace('Theatrical.','')
                  torrentName = torrentName.replace('Directors.Cut.','')
                 
                     
                  results.append({
                     'id': torrentId,
                     'name': torrentName,
                     'url': (self.urls['download'] % torrentId).encode('utf8'),
                     'detail_url': (self.urls['detail'] % torrentId).encode('utf8'),
                     'size': self.parseSize(result.find('div', attrs = {'id' : 'torrent-size'}).text),
                     'seeders': tryInt(result.find('div', attrs = {'id' : 'torrent-seeders'})),
                     'leechers': tryInt(result.find('div', attrs = {'id' : 'torrent-leechers'})),
               })               

         except:
            log.error('Failed to parsing %s: %s', (self.getName(),traceback.format_exc()))


   def getLoginParams(self):
      return tryUrlencode({
         'username': self.conf('username'),
         'password': self.conf('password'),
      })

   def loginSuccess(self, output):
      if "<title>NextGen - Login</title>" in output:
         return False
      else:
         return True
     

   loginCheckSuccess = loginSuccess

   def login(self):

      # Check if we are still logged in every hour
      now = time.time()
      if self.last_login_check and self.last_login_check < (now - 3600):
         try:
            output = self.urlopen(self.urls['test'])
            if self.loginCheckSuccess(output):
               self.last_login_check = now
               return True
         except: pass
         self.last_login_check = None

      if self.last_login_check:
         return True

      try:
         # Find csrf for login
         data_login = self.getHTMLData(self.urls['login_page'])
         bs = BeautifulSoup(data_login.decode('iso-8859-1'))
         csrfraw = bs.find('form', attrs = {'id': 'login'})['action']
         
         # Create 'login' in self.urls
         self.urls['login'] = (self.urls['test'] + csrfraw).encode('utf8')
         output = self.urlopen(self.urls['login'] + '&' + self.getLoginParams())
         

         if self.loginSuccess(output):
            self.last_login_check = now
            return True

         error = 'unknown'
      except:
         error = traceback.format_exc()

      self.login_opener = None
      log.error('Failed to login %s: %s', (self.getName(), error))
      return False

mbeltoft
Junior Member
Posts: 31
Joined: 19 Sep 2012 18:58
Has thanked: 4 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby mbeltoft » 11 Aug 2014 15:00

heres the log again.

look like the search url is returning something else than what is expected. Could it be this CloudFlare that mess things up?

Code: Select all

08-11 14:53:59DEBUG[o.core.notifications.core] Cleaning messages
08-11 14:53:59DEBUG[o.core.notifications.core] Done cleaning messages
08-11 14:54:03INFO[hpotato.core.plugins.base] Opening url: get https://api.couchpota.to/search/p/?limit=5, data: []
08-11 14:54:03INFO[hpotato.core.plugins.base] Opening url: get http://www.omdbapi.com/?y=&t=p, data: []
08-11 14:54:03DEBUG[hpotato.core.plugins.base] Setting cache 5e2d2c2c2abbfc3ae64b323b328cf99b
08-11 14:54:03DEBUG[hpotato.core.plugins.base] Setting cache omdbapi.cache.p
08-11 14:54:03DEBUG[   couchpotato.core.event] Return modified results for info.search
08-11 14:54:05INFO[hpotato.core.plugins.base] Opening url: get http://www.omdbapi.com/?y=&t=pirate+fa, data: []
08-11 14:54:05INFO[hpotato.core.plugins.base] Opening url: get https://api.couchpota.to/search/pirate+fa/?limit=5, data: []
08-11 14:54:05DEBUG[hpotato.core.plugins.base] Setting cache a8ae3c885714db61d77d05c269af066f
08-11 14:54:05DEBUG[hpotato.core.plugins.base] Setting cache omdbapi.cache.pirate fa
08-11 14:54:05DEBUG[   couchpotato.core.event] Return modified results for info.search
08-11 14:54:09INFO[hpotato.core.plugins.base] Opening url: get https://api.couchpota.to/ismovie/tt2483260/, data: []
08-11 14:54:09DEBUG[hpotato.core.plugins.base] Setting cache 9bac6c2a17022bb36a9991486a2dfa4d
08-11 14:54:09DEBUG[e.providers.info.fanarttv] Getting Extra Artwork from Fanart.tv...
08-11 14:54:09DEBUG[providers.info.themoviedb] Getting info: tmdb.cache.tt2483260
08-11 14:54:09INFO[hpotato.core.plugins.base] Opening url: get http://webservice.fanart.tv/v3/movies/tt2483260?api_key=xxx
08-11 14:54:09INFO[hpotato.core.plugins.base] Opening url: get https://api.couchpota.to/info/tt2483260/, data: []
08-11 14:54:09INFO[hpotato.core.plugins.base] Opening url: get http://www.omdbapi.com/?i=tt2483260, data: []
08-11 14:54:09DEBUG[hpotato.core.plugins.base] Setting cache 28cae52d5ef706e82b06cb6ebe0e83dc
08-11 14:54:09DEBUG[hpotato.core.plugins.base] Setting cache omdbapi.cache.tt2483260
08-11 14:54:09INFO[ie.providers.info.omdbapi] Found: The Pirate Fairy (2014)
08-11 14:54:09DEBUG[hpotato.core.plugins.base] Setting cache 99bc376a43aaa1a6413b59006e54bbbc
08-11 14:54:09DEBUG[e.providers.info.fanarttv] Found images for The Pirate Fairy
08-11 14:54:10DEBUG[hpotato.core.plugins.base] Setting cache tmdb.cache.175112
08-11 14:54:10DEBUG[hpotato.core.plugins.base] Setting cache tmdb.cache.tt2483260
08-11 14:54:10DEBUG[   couchpotato.core.event] Return modified results for movie.info
08-11 14:54:10DEBUG[e.providers.info.fanarttv] Getting Extra Artwork from Fanart.tv...
08-11 14:54:10DEBUG[o.core.notifications.core] Notifying frontend
08-11 14:54:10DEBUG[hpotato.core.plugins.base] Getting cache omdbapi.cache.tt2483260
08-11 14:54:10DEBUG[hpotato.core.plugins.base] Getting cache 99bc376a43aaa1a6413b59006e54bbbc
08-11 14:54:10INFO[ie.providers.info.omdbapi] Found: The Pirate Fairy (2014)
08-11 14:54:10DEBUG[hpotato.core.plugins.base] Getting cache 28cae52d5ef706e82b06cb6ebe0e83dc
08-11 14:54:10DEBUG[o.core.notifications.core] Done notifying frontend
08-11 14:54:10DEBUG[e.providers.info.fanarttv] Found images for The Pirate Fairy
08-11 14:54:10DEBUG[hpotato.core.plugins.base] Getting cache tmdb.cache.tt2483260
08-11 14:54:10DEBUG[   couchpotato.core.event] Return modified results for movie.info
08-11 14:54:10DEBUG[to.core.media.movie._base] Adding titles: [u'The Pirate Fairy', u'Tinker Bell and the Pirate Fairy', u'Tinker Bell and the Quest for the Queen', u'Clochette et la f\xe9e pirate', u'Tinker Bell 5 - The Pirate Fairy', u'I Tinkerbell kai oi Peirates', u'\u0397 \u03a4\u03af\u03bd\u03ba\u03b5\u03c1\u03bc\u03c0\u03b5\u03bb \u03ba\u03b1\u03b9 \u03bf\u03b9 \u03a0\u03b5\u03b9\u03c1\u03b1\u03c4\u03ad\u03c2', u'Tinker Bell 6: The Pirate Fairy', u'F\xe9e Clochette et la f\xe9e pirate', u'Tingeling och Piratfen', u'Klokkeblomst og piratfeen']
08-11 14:54:10DEBUG[to.core.media._base.media] Changing status for The Pirate Fairy
08-11 14:54:10INFO[hpotato.core.plugins.base] Opening url: get https://api.couchpota.to/eta/tt2483260/, data: []
08-11 14:54:10DEBUG[hpotato.core.plugins.base] Setting cache b2ea29bf1a09a9cec6ef7e926c224d0c
08-11 14:54:10DEBUG[iders.info.couchpotatoapi] Found ETA for tt2483260: {u'dvd': 1396303200, u'expires': 1408014035, u'theater': 0, u'bluray': True}
08-11 14:54:10DEBUG[o.core.notifications.core] Notifying frontend
08-11 14:54:10DEBUG[o.core.notifications.core] Done notifying frontend
08-11 14:54:10INFO[core.media.movie.searcher] Search for The Pirate Fairy in 1080p ignoring ETA
08-11 14:54:10INFO[hpotato.core.plugins.base] Opening url: get http://nxtgn.org/browse.php?search=the+pirate+fairy+2014&cat=0&incldead=0&modes=&c9=1&c33=1&c38=1&c43=1&c47=1, data: []
08-11 14:54:10DEBUG[hpotato.core.plugins.base] Setting cache 7b4590a98722b93f0cd242cc135171d8
08-11 14:54:10INFO[                   nxtgen] <!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
//<![CDATA[
try{if (!window.CloudFlare) {var CloudFlare=[{verbose:0,p:0,byc:0,owlid:"cf",bag2:1,mirage2:0,oracle:0,paths:{cloudflare:"/cdn-cgi/nexp/dokv=88e434a982/"},atok:"4ba762b24de096d1fc32fee3e325fb86",petok:"abd620b91c38d3f2965f447ea67e18442183708f-1407761650-1800",zone:"nxtgn.org",rocket:"0",apps:{}}];CloudFlare.push({"apps":{"ape":"a4ed447e59da9e16ca438ffee774d734"}});!function(a,b){a=document.createElement("script"),b=document.getElementsByTagName("script")[0],a.async=!0,a.src="//ajax.cloudflare.com/cdn-cgi/nexp/dokv=97fb4d042e/cloudflare.min.js",b.parentNode.insertBefore(a,b)}()}}catch(e){};
//]]>
</script>
<link href="styles/login.css?1407761643" rel="stylesheet" type="text/css"/><title>NextGen - Login</title>
</head>
<body>
<form action="takelogin.php?csrf=e8ea8cae3babce0c0a69b7a1cbd209b6" id="login" method="post">
<h1 class="ribbon" id="ff-proof">NextGen - Name of The Game   </h1>
<fieldset id="inputs">
<input autofocus="autofocus" id="username" name="username" placeholder="Brugernavn" type="text"/>
<input id="password" name="password" placeholder="Kodeord" type="password"/>
<input id="OTP" name="OTP" placeholder="One Time Password" type="text"/>
</fieldset>
<fieldset id="actions">
<input id="submit" type="submit" value="Log ind"/>
<p class="option"><a href="recover.php">Gendan kode</a>   |
       <a href="javascript:void(0)" onclick="document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">Hvad er OTP?</a>
<!--&nbsp;&nbsp; |
       <p class="option"><a href="recover.php">Hjælp</a>-->
</p>
</fieldset>
<div class="support">
<a class="supprt-link" href="/help.php" title="Vores online support"><img src="/pic/customers2.png"/></a>
</div>
<input name="returnto" type="hidden" value="/browse.php?search=the+pirate+fairy+2014&amp;cat=0&amp;incldead=0&amp;modes=&amp;c9=1&amp;c33=1&amp;c38=1&amp;c43=1&amp;c47=1"/>
</form>
<div class="white_content" id="light">
        One Time Password som det kendes fra Gmail mm.<br/>Aktivers for yderligere sikkerhed.<br/><br/>
        1. Installer Authenticator app (<a class="content" href="https://itunes.apple.com/dk/app/google-authenticator/id388497605?mt=8">iOS</a> / <a class="content" href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2">Android</a> / <a class="content" href="http://www.windowsphone.com/en-us/store/app/authenticator/021dd79f-0598-e011-986b-78e7d1fa76f8">WP</a>)<br/>
        2. Scan koden med programmet<img src=""/><br/>
        3. Og du er i gang med OTP.
        <br/>Hvis du aktivere dette (gøres under "Ændre Profil") skal du bruge appen og den vil give dig en kode du skal skrive i feltet OTP, hver gang du logger ind.<br/>
        Hvis du ikke har det aktiveret skal feltet "One Time Password" være blank.
        <a class="close" href="javascript:void(0)" onclick="document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">X</a>
</div>
<div class="black_overlay" id="fade"></div>
</body>
</html>
08-11 14:54:10INFO[                   nxtgen] no torrent table found from nxtgn
08-11 14:54:10DEBUG[core.media.movie.searcher] Nothing found for The Pirate Fairy in 1080p
08-11 14:54:10INFO[core.media.movie.searcher] Search for The Pirate Fairy in 1080p ignoring ETA
08-11 14:54:10DEBUG[hpotato.core.plugins.base] Getting cache 7b4590a98722b93f0cd242cc135171d8
08-11 14:54:10INFO[                   nxtgen] <!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
//<![CDATA[
try{if (!window.CloudFlare) {var CloudFlare=[{verbose:0,p:0,byc:0,owlid:"cf",bag2:1,mirage2:0,oracle:0,paths:{cloudflare:"/cdn-cgi/nexp/dokv=88e434a982/"},atok:"4ba762b24de096d1fc32fee3e325fb86",petok:"abd620b91c38d3f2965f447ea67e18442183708f-1407761650-1800",zone:"nxtgn.org",rocket:"0",apps:{}}];CloudFlare.push({"apps":{"ape":"a4ed447e59da9e16ca438ffee774d734"}});!function(a,b){a=document.createElement("script"),b=document.getElementsByTagName("script")[0],a.async=!0,a.src="//ajax.cloudflare.com/cdn-cgi/nexp/dokv=97fb4d042e/cloudflare.min.js",b.parentNode.insertBefore(a,b)}()}}catch(e){};
//]]>
</script>
<link href="styles/login.css?1407761643" rel="stylesheet" type="text/css"/><title>NextGen - Login</title>
</head>
<body>
<form action="takelogin.php?csrf=e8ea8cae3babce0c0a69b7a1cbd209b6" id="login" method="post">
<h1 class="ribbon" id="ff-proof">NextGen - Name of The Game   </h1>
<fieldset id="inputs">
<input autofocus="autofocus" id="username" name="username" placeholder="Brugernavn" type="text"/>
<input id="password" name="password" placeholder="Kodeord" type="password"/>
<input id="OTP" name="OTP" placeholder="One Time Password" type="text"/>
</fieldset>
<fieldset id="actions">
<input id="submit" type="submit" value="Log ind"/>
<p class="option"><a href="recover.php">Gendan kode</a>   |
       <a href="javascript:void(0)" onclick="document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">Hvad er OTP?</a>
<!--&nbsp;&nbsp; |
       <p class="option"><a href="recover.php">Hjælp</a>-->
</p>
</fieldset>
<div class="support">
<a class="supprt-link" href="/help.php" title="Vores online support"><img src="/pic/customers2.png"/></a>
</div>
<input name="returnto" type="hidden" value="/browse.php?search=the+pirate+fairy+2014&amp;cat=0&amp;incldead=0&amp;modes=&amp;c9=1&amp;c33=1&amp;c38=1&amp;c43=1&amp;c47=1"/>
</form>
<div class="white_content" id="light">
        One Time Password som det kendes fra Gmail mm.<br/>Aktivers for yderligere sikkerhed.<br/><br/>
        1. Installer Authenticator app (<a class="content" href="https://itunes.apple.com/dk/app/google-authenticator/id388497605?mt=8">iOS</a> / <a class="content" href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2">Android</a> / <a class="content" href="http://www.windowsphone.com/en-us/store/app/authenticator/021dd79f-0598-e011-986b-78e7d1fa76f8">WP</a>)<br/>
        2. Scan koden med programmet<img src=""/><br/>
        3. Og du er i gang med OTP.
        <br/>Hvis du aktivere dette (gøres under "Ændre Profil") skal du bruge appen og den vil give dig en kode du skal skrive i feltet OTP, hver gang du logger ind.<br/>
        Hvis du ikke har det aktiveret skal feltet "One Time Password" være blank.
        <a class="close" href="javascript:void(0)" onclick="document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">X</a>
</div>
<div class="black_overlay" id="fade"></div>
</body>
</html>
08-11 14:54:10INFO[                   nxtgen] no torrent table found from nxtgn
08-11 14:54:10DEBUG[core.media.movie.searcher] Nothing found for The Pirate Fairy in 1080p
08-11 14:54:10DEBUG[o.core.notifications.core] Notifying frontend
08-11 14:54:10DEBUG[o.core.notifications.core] Done notifying frontend
08-11 14:54:10DEBUG[o.core.notifications.core] Notifying frontend
08-11 14:54:10DEBUG[o.core.notifications.core] Done notifying frontend
08-11 14:54:11DEBUG[o.core.notifications.core] Getting messages with id: 2d78bde7-551a-4134-b56c-a6e8376f9703
08-11 14:54:11DEBUG[o.core.notifications.core] Returning for 2d78bde7-551a-4134-b56c-a6e8376f9703 3 messages
08-11 14:54:13DEBUG[o.core.notifications.core] Getting messages with id: 592fa53e-651e-4eeb-a6a9-202feda4fee8
08-11 14:54:13DEBUG[o.core.notifications.core] Returning for 592fa53e-651e-4eeb-a6a9-202feda4fee8 0 messages
08-11 14:54:14DEBUG[o.core.notifications.core] Cleaning messages
08-11 14:54:14DEBUG[o.core.notifications.core] Done cleaning messages


EDIT:

It's the login page it returns so looks like it's not logging in correct, however I'm not getting a warning that someone have tried to login to my account as I would normally get if some tries to login using the wrong password

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby clinton.hall » 11 Aug 2014 15:09

so it looks like the whole login step is being bypassed?

I'm off to bed now... will need to look at this again tomorrow... (Sorry, but I need sleep ;) )

mbeltoft
Junior Member
Posts: 31
Joined: 19 Sep 2012 18:58
Has thanked: 4 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby mbeltoft » 11 Aug 2014 15:15

okay.. thanks for the help so far :D

Good Night

mbeltoft
Junior Member
Posts: 31
Joined: 19 Sep 2012 18:58
Has thanked: 4 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby mbeltoft » 12 Aug 2014 14:00

changed the https:// in main.py to http:// and now it looks like its working :D
I was able to snatch some movies from nxtgen via CP now

Thanks so much for the help :D


I've disabled the debug log again but does it matter that the scraped html is showed in the debug log? should it be removed again

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby clinton.hall » 13 Aug 2014 04:36

Excellent, glad to hear...

To clean up the logs, just remove (or put a '#' in front of) the extra

Code: Select all

log.info(....)
lines.

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby clinton.hall » 13 Aug 2014 04:38

Code: Select all

      if data:
     
         html = BeautifulSoup(data)
         log.info(html)                       
         try:


becomes

Code: Select all

      if data:
     
         html = BeautifulSoup(data)                       
         try:


and

Code: Select all

            if not len(entries) > 0:
               log.info('no entries found on nxtgn torrent table')
            else:
               log.info('%s entries found from nxtgn' % str(len(entries)))
               # Extracting results from entries
               for result in entries:

becomes

Code: Select all

            if len(entries) > 0:
               # Extracting results from entries
               for result in entries:

mbeltoft
Junior Member
Posts: 31
Joined: 19 Sep 2012 18:58
Has thanked: 4 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby mbeltoft » 13 Aug 2014 08:43

Excellent. again thank you for the help. Im sure alot of nxtgen members will be happy that its working again.
feel free to add it as a permanent provider in CP

:D:D

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby clinton.hall » 13 Aug 2014 09:13

Hmmm I could send a pull request, but I know RuudBurger is selective as to the providers that are built in.
The way this code is now structured is intended as a custom provider...

Best thing to do would be to link it here https://couchpota.to/forum/viewtopic.php?f=17&t=1428
If you post the working files somewhere where they can be downloaded from, and give me the link i can add the link to that post... obviously this can be posted at nxtgn.

Also, just confirm what language/region nxtgn is for? (i.e is this a country specific provider?)

mbeltoft
Junior Member
Posts: 31
Joined: 19 Sep 2012 18:58
Has thanked: 4 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby mbeltoft » 13 Aug 2014 16:56

I've uploaded the files to here

https://github.com/beltoft/cps.nxtgn

nxtgn is a danish/Nordic torrent tracker. its specialty is custom danish subs for movies and series

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby clinton.hall » 14 Aug 2014 07:59

Added to the main list. Thanks.

mbeltoft
Junior Member
Posts: 31
Joined: 19 Sep 2012 18:58
Has thanked: 4 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby mbeltoft » 14 Aug 2014 12:13

Great ... but you have put it in as Norwegian while its in fact Danish (We danish don't take light on that mistake ;) :P )

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby clinton.hall » 15 Aug 2014 04:39

Sorry... I copied down the details from the previous one in the list, then edited the links...
I have now fixed.

thade
Junior Member
Posts: 5
Joined: 19 Aug 2014 09:10
Has thanked: 1 time
Status: Offline

Re: Getting a 3rd party provider to work?

Postby thade » 19 Aug 2014 09:52

Hi, I am new on this forum and first of all I wanted to thank you for this great tool. It saved a lot of time for me. :)

Second, I have a ... I don't know how to put it. :blush:
I was using one of the 3rd party providers(filelist) with the old CP. But now it is not working anymore since the upgrade.
Somebody updated it, but still, it does not work. I tried based on your advice's to "fix it". I used quotes because I am new in this and after some lost nights I still don't understand to much. :@
I managed to list it in the providers menu :D. But when I search for a movie it keeps telling me that I don't have any provider for this downloader.(or something like that - I am not around my PC at the moment).
I don't know who created, so I can't contact him.
I am in a strange situation now, I want to use this but I am not able. And I don't have the knowledge to fix it. :s
So, I have a request. Maybe someone who knows this can check at least the providers from the 3rd party providers topic. Or maybe somebody knows who created so I can contact him?
Or any other advice...
Thank you

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: Getting a 3rd party provider to work?

Postby clinton.hall » 19 Aug 2014 23:32

which provider specifically?


Return to “External Tools”