Compare commits
549 Commits
alpha
...
prove_interne
| Author | SHA1 | Date | |
|---|---|---|---|
| fdfaacbd4e | |||
| dc96c1705d | |||
| c0a5629d8f | |||
| dc9f552708 | |||
| 746738a868 | |||
| a0e45bd896 | |||
| 073b755100 | |||
| 26ac0660f7 | |||
| 5a2c9fb6ac | |||
| b5b4427941 | |||
| 7ff96d2248 | |||
| f544552b5f | |||
| b0a4688038 | |||
| 4e1e761c0a | |||
| f394372f78 | |||
| 6c43f5101b | |||
| 9109d6ec55 | |||
| f6a10e1eda | |||
| 1542f6493a | |||
| 10f0899e81 | |||
| d5ec41e305 | |||
| 0be70c79b1 | |||
| 36b8912a18 | |||
| b66d292ff2 | |||
| d723f0552b | |||
| 4cfb971475 | |||
| b0f3e4022c | |||
| 7e2c5a6b4b | |||
| a832a90dfa | |||
| be782638d1 | |||
| d3e6779ea5 | |||
| c3ba3a1be6 | |||
| 7feac8a061 | |||
| e937b70a65 | |||
| 51042bf9df | |||
| ef6e3eecb4 | |||
| 518d99893a | |||
| 56869b48d0 | |||
| 4a8b3fd1b6 | |||
| de8d6ff46d | |||
| 667f7f31ff | |||
| 1102ad2191 | |||
| 88c011ec75 | |||
| d83541b5cb | |||
| 24c5489d2d | |||
| 50372763dc | |||
| a5c265ac40 | |||
| 77dc4168ff | |||
| d20384c9cf | |||
| fb80f47bc8 | |||
| f590067983 | |||
| 5383448d44 | |||
| 9e991c2d49 | |||
| 555c0491f2 | |||
| 1fda900526 | |||
| 17d90cd906 | |||
| d4129b0da2 | |||
| 80261ee7ce | |||
| 2f5cb8d959 | |||
| 1bfc5841f8 | |||
| 89e13e71f8 | |||
| 2d67edd310 | |||
| 352df6dea6 | |||
| 636371b658 | |||
| c190f9e3d7 | |||
| 812b4a5b08 | |||
| 22337380aa | |||
| 83aab2a115 | |||
| c9798071f3 | |||
| 1cc2790198 | |||
| ed82c22823 | |||
| 0042142878 | |||
| 422d21d2a0 | |||
| 2c4e0330ba | |||
| 20b5a52d40 | |||
| d300adbdb4 | |||
| aec6f6811e | |||
| 86bff2be1e | |||
| bfff10a459 | |||
| d93ac324ce | |||
| 96b2a4dbfd | |||
| fa188aa719 | |||
| 65475409b6 | |||
| 16d3ad375f | |||
| 50b8ac8c08 | |||
| 794828696b | |||
| 26da64bceb | |||
| 20f9048225 | |||
| 7d7f191f3c | |||
| 89c577dc32 | |||
| 52ad47a924 | |||
| bf9e875195 | |||
| eca909a5f8 | |||
| 2198e6a8a8 | |||
| 005236f52e | |||
| 4441f443b4 | |||
| fd4071bc36 | |||
| f7639a7321 | |||
| 44808ac042 | |||
| 95ff7ddeea | |||
| 09df8697ea | |||
| 3b746a5fa1 | |||
| 7c41d4a16f | |||
| 68b126153b | |||
| bff9e65af6 | |||
| f7d661dabf | |||
| 336470cc96 | |||
| 43da897cf3 | |||
| 51da0d223d | |||
| a1236b244d | |||
| a33b455d85 | |||
| bf04f60efd | |||
| 0576e101d9 | |||
| 47b1dca226 | |||
| f3bd94fd2b | |||
| e0b99a5491 | |||
| 5fbf15b83b | |||
| 4b71a0d708 | |||
| 1401d79879 | |||
| 7fc11153fd | |||
| d79e9f358c | |||
| aaab9b867d | |||
| 4ac8a7d863 | |||
| ebd3473750 | |||
| 074e7b9c79 | |||
| f85f8a94d5 | |||
| 71b7f72f13 | |||
| ccf72d517b | |||
| 6f9a35ebbc | |||
| 7ab66fbb8a | |||
| 5484fcc661 | |||
| 1a782fd8da | |||
| 33ba9fea0d | |||
| 4f4d4bc54f | |||
| 336e485f60 | |||
| 6c3976424a | |||
| 72ba8d6efd | |||
| d39194384b | |||
| 58287a76ac | |||
| fc924e604d | |||
| 1398e96ed6 | |||
| 6aabebb232 | |||
| 9e3f74f453 | |||
| cc9445ae7c | |||
| 61057ded3b | |||
| b3a552e7ef | |||
| 7b64e558e7 | |||
| ee5bde91a5 | |||
| e33e46570f | |||
| 94912089b7 | |||
| 1135c9b96d | |||
| 82346899f1 | |||
| 49e609b4e0 | |||
| 75d83f423c | |||
| 6c6d10f35c | |||
| 92d009ccd7 | |||
| 70e3deaa31 | |||
| 4eeb4f7627 | |||
| 152633e912 | |||
| 1c07e53788 | |||
| ad2804a32c | |||
| 247630947f | |||
| a2f03b5f55 | |||
| 3f9ecc60eb | |||
| 4b5488b445 | |||
| 51e19264f4 | |||
| 4af7e668cc | |||
| 26cd6d4f24 | |||
| 2d9413af9d | |||
| f3011b5b5d | |||
| 2b8b1d42f2 | |||
| f92894e877 | |||
| 0fca66e7f4 | |||
| 5cc3290bef | |||
| 0e1c544add | |||
| 4805152a7d | |||
| 4cea872956 | |||
| c7fad20777 | |||
| 7de34da0b8 | |||
| 7c9da143a9 | |||
| e3544248ee | |||
| 87cfef27ea | |||
| 8803f1a1dd | |||
| 823b234549 | |||
| 06ea564dbf | |||
| 5923da3325 | |||
| 12943c26d9 | |||
| afa381d6ba | |||
| 911d4b2a9d | |||
| e8ad9c3c0f | |||
| 46302a0f7f | |||
| 77e9338661 | |||
| 647fdf9987 | |||
| 4396e4ce15 | |||
| 905e9aeafe | |||
| bbd10b5f76 | |||
| ff5a009167 | |||
| 4ef558dd5b | |||
| 3b89ecd157 | |||
| fae18dd562 | |||
| a1e14e3f51 | |||
| d02891bb2b | |||
| 7eec8ffbc0 | |||
| 84b5d77139 | |||
| 5c072c8530 | |||
| 41ed3c2210 | |||
| 88251e9f1a | |||
| cd7df20b9f | |||
| 4e8c12ed50 | |||
| 49ad5154cf | |||
| 9e06b9acb5 | |||
| 1e2bd87b7e | |||
| 0cf74df051 | |||
| 9342bfaa06 | |||
| ff4e30dcd7 | |||
| d3240f4b78 | |||
| 69d5088b85 | |||
| 566628b774 | |||
| bf8417674e | |||
| c829292cc3 | |||
| 0d34139dea | |||
| 788cfcff22 | |||
| 1d9b5c9dd1 | |||
| 30842961d2 | |||
| 537668906f | |||
| 69fa5e7bf4 | |||
| 2de8b6c7e0 | |||
| 6324d3124c | |||
| a58129f03c | |||
| d7451c421d | |||
| 61b50ec301 | |||
| 73247722da | |||
| 724e61820e | |||
| cf41316ffc | |||
| 613b9abcc6 | |||
| 7e7c7e8654 | |||
| 3b3902cb29 | |||
| 9b65bb4291 | |||
| 104c2d4fd4 | |||
| 0e915e591a | |||
| 8221e09825 | |||
| 71cb39ddc4 | |||
| aacdd5d749 | |||
| db39d6bed9 | |||
| 187b66fd7c | |||
| c2625c9ba8 | |||
| 64fe224029 | |||
| 471a7bb74b | |||
| 938b1b5c69 | |||
| 8bad53bdd5 | |||
| e0eef19c78 | |||
| 52abd760a4 | |||
| 888956b158 | |||
| e892af34bb | |||
| 621725d354 | |||
| caf4b83230 | |||
| 872170d935 | |||
| 71e29792d0 | |||
| de6d1eb0da | |||
| 6cb981d4f1 | |||
| 21574b21db | |||
| 881f268079 | |||
| 29a5b2569e | |||
| a7a94eb20b | |||
| f339fabffa | |||
| adfaa868c8 | |||
| 06c7467e4a | |||
| 0129828c54 | |||
| 542cb33c03 | |||
| c21ae8cf07 | |||
| c02050417d | |||
| edecfb8df4 | |||
| 9cc3ab7f52 | |||
| 17a33a6ed9 | |||
| 682eeddce6 | |||
| 0505607b09 | |||
| de8a2388fd | |||
| 297603f6cb | |||
| db33ccf61f | |||
| 180c2d640a | |||
| ed94dedbc2 | |||
| 8ce21e8e10 | |||
| d682cd7886 | |||
| 519830bfea | |||
| a6c8a61a0b | |||
| 03e8d7018f | |||
| 91871c7846 | |||
| 92e8a3fcc4 | |||
| 791ac16674 | |||
| afd99db33f | |||
| 4caad5d27f | |||
| a9ccecdd44 | |||
| 38585f5baa | |||
| 0dd880537c | |||
| 84b30d3be6 | |||
| 4a1735fbb4 | |||
| 2bfad01bd5 | |||
| 3b52812f55 | |||
| c92fbd38bb | |||
| fe109622fa | |||
| a3bfb3b184 | |||
| 139a7fe588 | |||
| 42b3bbf574 | |||
| 867a0bf36b | |||
| 27634c3907 | |||
| d8388c44a4 | |||
| dd2314153c | |||
| a47103c056 | |||
| d17b46465c | |||
| a953280d4d | |||
| b4ab8549ff | |||
| 0338d248e0 | |||
| 3fa58014f6 | |||
| a038497d94 | |||
| 3bd5d636e1 | |||
| a588b44c9c | |||
| 4a96b8c987 | |||
| 83b7e1e821 | |||
| 3e88831439 | |||
| 3de1441225 | |||
| 18e5302741 | |||
| e3939507b8 | |||
| 0a6708009e | |||
| b2a390a5c2 | |||
| da4ed8af4c | |||
| 05e6e5dea8 | |||
| a2bd4e464d | |||
| d2338d07b2 | |||
| c0b487b280 | |||
| 446af0fcfb | |||
| 71e4a487db | |||
| 4d31b961dd | |||
| d97ca5d5fa | |||
| d27fd3782f | |||
| 0c76096a22 | |||
| 897a5643a7 | |||
| 295304567d | |||
| f82509e60c | |||
| 8ec1b818f2 | |||
| 3d4893061c | |||
| cb963ec76f | |||
| ad40a34d5c | |||
| 35ff445f9b | |||
| 2409f7db37 | |||
| d8d1e123ef | |||
| 70665bea3c | |||
| 59e79739e5 | |||
| 1abb62ee01 | |||
| 6352e33a5a | |||
| 4298468aca | |||
| bc4f4330c1 | |||
| 591fb12edf | |||
| 5233da7638 | |||
| bc0af7e372 | |||
| bd4cca09ba | |||
| cbccf06cc5 | |||
| 92be087cc4 | |||
| 9af83f59d9 | |||
| 2ce628e367 | |||
| d67ccd9b75 | |||
| 94262e9a0c | |||
| 377044a879 | |||
| 264b2d4292 | |||
| 15785a653e | |||
| 2dee7d7708 | |||
| e1e817a93c | |||
| 547839f0b0 | |||
| 944d98a937 | |||
| 37e40653a8 | |||
| 34cc89f79e | |||
| ddd2933883 | |||
| 38eb4ac49f | |||
| 80019ab6b7 | |||
| 83cd0280ed | |||
| abec23383d | |||
| 7450a36530 | |||
| d0baa85fe2 | |||
| 08a0e5c0eb | |||
| 338526f107 | |||
| b7ba220e18 | |||
| 6f294c99bf | |||
| b62c616693 | |||
| 7b7f186e47 | |||
| d5c870db44 | |||
| dea6782c5e | |||
| 95f3ec68da | |||
| 6b546f0dc1 | |||
| 52f85673cc | |||
| a151ffbdff | |||
| 49764eae1f | |||
| 447104a66e | |||
| 49f341f6db | |||
| 4077f8888b | |||
| 802fcc3a13 | |||
| 06239735f5 | |||
| 5fec26bd6c | |||
| e1d6540fe6 | |||
| 6f2b34a857 | |||
| aafb008d5a | |||
| d21ba2dcb7 | |||
| 646de5cae4 | |||
| 54ad39f1fc | |||
| 686d491daf | |||
| 70f69acfff | |||
| 5e08aa3391 | |||
| 35f7a50345 | |||
| f1523e7467 | |||
| 6b03659b81 | |||
| 07fc2fb724 | |||
| c1efb6db57 | |||
| fdcc00d69e | |||
| f24e8c8da6 | |||
| 158372ed1b | |||
| 818a423dc9 | |||
| b43520223d | |||
| 714ea10b55 | |||
| 438b2a5da6 | |||
| 05102262ca | |||
| df6f3f1177 | |||
| 60de78f448 | |||
| 6e4aec0ab9 | |||
| ebbf37222e | |||
| 9828908bfe | |||
| 925a696a17 | |||
| 9d81c2e4b6 | |||
| 4610ba71af | |||
| 0aebc644fa | |||
| cce2e330ba | |||
| d0de267be7 | |||
| 18bb6bc4b2 | |||
| e70c18efa3 | |||
| 852588254a | |||
| e8c5f335b3 | |||
| 1b61616806 | |||
| ae93e4d1f6 | |||
| 9dcd33ac07 | |||
| d6d8153004 | |||
| b33a250f9e | |||
| d09be99136 | |||
| ec4510aea4 | |||
| 0276dd46f6 | |||
| 40d8501afc | |||
| 3f55c94662 | |||
| ebf520aaf2 | |||
| 8686308f86 | |||
| d002307088 | |||
| 182cca5d5e | |||
| df04d70e38 | |||
| bbc6aef5d2 | |||
| b3015d3ed8 | |||
| 9d1390491a | |||
| 2265300ebd | |||
| 2254d2851a | |||
| 6fde4bd5d7 | |||
| fe18e7c6c2 | |||
| d9a4f15340 | |||
| d6dd20ba1a | |||
| 1e4e68cb24 | |||
| cbb0d138ab | |||
| 9dfc558dc5 | |||
| 9c83458d93 | |||
| d8963766c2 | |||
| 53fa709767 | |||
| 3de393f030 | |||
| 6f4c090e7e | |||
| 04e121b196 | |||
| 7d855652e8 | |||
| 0b44d573a9 | |||
| 70a5a55e6d | |||
| 7270bda78e | |||
| f34269245c | |||
| 3defaa16ed | |||
| 8315a289b7 | |||
| ac6883c8b2 | |||
| 39a1c46b62 | |||
| 0274446ebb | |||
| 74ed9e24dc | |||
| 5b2c76a7de | |||
| 06fe40ed9e | |||
| 3bc27f3b05 | |||
| 253aae6137 | |||
| cdca6bb55f | |||
| e1e36e1a6a | |||
| 8c5ea39edf | |||
| 133b9e07aa | |||
| bc9e0a09e8 | |||
| ae36c65714 | |||
| 3b40059cac | |||
| 8877110b80 | |||
| 4eed606c30 | |||
| 3452861693 | |||
| c1a7544cc5 | |||
| f2fc022a7c | |||
| c0d514c165 | |||
| e926f8f504 | |||
| 039117311c | |||
| bd242f4875 | |||
| 974a581428 | |||
| 9977c2aa3c | |||
| 63ba995222 | |||
| 42f10a56d3 | |||
| 1efe6595e1 | |||
| 3ca7707c01 | |||
| a5ba79d176 | |||
| 8afa165501 | |||
| 6e0cd8ff46 | |||
| 1544f32c8c | |||
| 999dd188fb | |||
| af14b730f1 | |||
| 5229deeaf2 | |||
| 2aa492587f | |||
| 8c8a5c6f21 | |||
| 1bd771b565 | |||
| 613087342b | |||
| be6eb18570 | |||
| 207df5678d | |||
| 1892eab9a7 | |||
| b3a199e457 | |||
| 6a93857cc6 | |||
| e5d6d71017 | |||
| 40841e6435 | |||
| 716625fd34 | |||
| 03c4cc53a6 | |||
| a043fc3ab2 | |||
| 72300864c7 | |||
| f78ab57f5b | |||
| 9d3ca7d4bc | |||
| 3c1094ded3 | |||
| 23942b3245 | |||
| 01d3902fbb | |||
| c18b7fb226 | |||
| bb52f0eb00 | |||
| 729bc59e96 | |||
| 3954e0f2a2 | |||
| c984813f94 | |||
| e1d2352dc2 | |||
| a782901afc | |||
| b8de2e3df5 | |||
| a0b64c4cdf | |||
| 293f9e15c6 | |||
| 4350a593d7 | |||
| d50299ca55 | |||
| 2d00118252 | |||
| 9e44409ab5 | |||
| a286187235 | |||
| 87b205c50a | |||
| 352cdbaf3d | |||
| 2f5c6752bd | |||
| 3712d65afd |
@@ -7,3 +7,5 @@ custom_code.json
|
||||
last_commit.txt
|
||||
__pycache__/
|
||||
.vscode/settings.json
|
||||
bin/
|
||||
lib/abi
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.kod" name="Kodi on Demand BETA" version="1.7" provider-name="KoD Team">
|
||||
<addon id="plugin.video.kod" name="Kodi on Demand BETA" version="1.7.6" provider-name="KoD Team">
|
||||
<requires>
|
||||
<!-- <import addon="script.module.libtorrent" optional="true"/> -->
|
||||
<import addon="metadata.themoviedb.org"/>
|
||||
@@ -28,9 +28,10 @@
|
||||
<screenshot>resources/media/screenshot-2.png</screenshot>
|
||||
<screenshot>resources/media/screenshot-3.png</screenshot>
|
||||
</assets>
|
||||
<news>- Aggiunto menu globale "opzioni di KoD"
|
||||
- Aggiunto canale tapmovie e server annessi
|
||||
- Notifica quando il tipo di vista viene salvata (con indicazione del tipo di contenuto)
|
||||
<news>- fix di routine ai canali/server
|
||||
- disabilitati cb01anime e tantifilm
|
||||
- aggiunta opzione "mostra server" nel menu contestuale della libreria
|
||||
- più opzioni per quanto riguarda l'aggiornamento della videoteca
|
||||
</news>
|
||||
<description lang="it">Naviga velocemente sul web e guarda i contenuti presenti</description>
|
||||
<disclaimer>[COLOR red]The owners and submitters to this addon do not host or distribute any of the content displayed by these addons nor do they have any affiliation with the content providers.[/COLOR]
|
||||
|
||||
+20
-30
@@ -1,54 +1,44 @@
|
||||
{
|
||||
"direct": {
|
||||
"altadefinizione01": "https://www.altadefinizione01.plus",
|
||||
"altadefinizione01_link": "https://altadefinizione01.travel",
|
||||
"altadefinizione01": "https://www.altadefinizione01.sbs",
|
||||
"animealtadefinizione": "https://www.animealtadefinizione.it",
|
||||
"animeforce": "https://www.animeforce.it",
|
||||
"animeleggendari": "https://animezeus.com",
|
||||
"animesaturn": "https://www.animesaturn.it",
|
||||
"animeunity": "https://www.animeunity.it",
|
||||
"animesaturn": "https://www.animesaturn.in",
|
||||
"animeunity": "https://www.animeunity.tv",
|
||||
"animeuniverse": "https://www.animeuniverse.it",
|
||||
"animeworld": "https://www.animeworld.tv",
|
||||
"aniplay": "https://aniplay.it",
|
||||
"casacinema": "https://www.casacinema.page",
|
||||
"casacinema": "https://www.casacinema.lol",
|
||||
"cb01anime": "https://www.cineblog01.red",
|
||||
"cineblog01": "https://cb01.uno",
|
||||
"cinemalibero": "https://cinemalibero.bar",
|
||||
"cinemalibero": "https://cinemalibero.cafe",
|
||||
"cinetecadibologna": "http://cinestore.cinetecadibologna.it",
|
||||
"discoveryplus": "https://www.discoveryplus.com",
|
||||
"dreamsub": "https://dreamsub.stream",
|
||||
"dsda": "https://www.dsda.press",
|
||||
"eurostreaming": "https://eurostreaming.bar",
|
||||
"filmigratis": "https://filmigratis.org",
|
||||
"dreamsub": "https://www.animeworld.tv",
|
||||
"eurostreaming": "https://eurostreaming.party",
|
||||
"eurostreaming_actor": "https://eurostreaming.actor",
|
||||
"filmstreaming": "https://filmstreaming.media",
|
||||
"guardaseriecam": "https://guardaserie.cam",
|
||||
"guardaserieclick": "https://www.guardaserie.builders",
|
||||
"guardaserieicu": "https://guardaserie.cfd",
|
||||
"hd4me": "https://hd4me.net",
|
||||
"ilcorsaronero": "https://ilcorsaronero.link",
|
||||
"ilgeniodellostreaming": "https://ilgeniodellostreaming.wtf",
|
||||
"ilgeniodellostreaming_cam": "https://ilgeniodellostreaming.city",
|
||||
"italiaserie": "https://italiaserie.date",
|
||||
"mediasetplay": "https://www.mediasetplay.mediaset.it",
|
||||
"ilgeniodellostreaming_cam": "https://ilgeniodellostreaming.sbs",
|
||||
"mediasetplay": "https://mediasetinfinity.mediaset.it",
|
||||
"mondoserietv": "https://mondoserietv.club",
|
||||
"paramount": "https://www.paramountnetwork.it",
|
||||
"paramount": "https://www.mtv.it",
|
||||
"piratestreaming": "https://www.piratestreaming.design",
|
||||
"polpotv": "https://roma.polpo.tv",
|
||||
"plutotv": "https://pluto.tv",
|
||||
"raiplay": "https://www.raiplay.it",
|
||||
"seriehd": "https://altadefinizionecommunity.casa",
|
||||
"serietvonline": "https://serietvonline.art",
|
||||
"serietvsubita": "http://serietvsubita.xyz",
|
||||
"serietvu": "https://www.serietvu.live",
|
||||
"streamingcommunity": "https://streamingcommunity.vip",
|
||||
"streamingcommunity": "https://streamingcommunity.tech",
|
||||
"streamingita": "https://www.streamingita.wtf",
|
||||
"streamtime": "https://t.me/s/StreamTime",
|
||||
"tantifilm": "https://www.tantifilm.stream",
|
||||
"tapmovie": "https://it.tapmovie.net",
|
||||
"toonitalia": "https://toonitalia.co",
|
||||
"vvvvid": "https://www.vvvvid.it"
|
||||
"tantifilm": "https://www.tantifilm.yachts",
|
||||
"toonitalia": "https://toonitalia.co"
|
||||
},
|
||||
"findhost": {
|
||||
"altadefinizioneclick": "https://altadefinizione-nuovo.click",
|
||||
"altadefinizionecommunity": "https://altaregistrazione.com",
|
||||
"altadefinizione": "https://altadefinizione.nuovo.live",
|
||||
"altadefinizionecommunity": "https://altaregistrazione.net",
|
||||
"animealtadefinizione": "https://www.animealtadefinizione.it",
|
||||
"cineblog01": "https://cb01.uno",
|
||||
"filmpertutti": "https://filmpertuttiii.nuovo.live"
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
# fix:
|
||||
# 1. aggiunto pagination e sistemate alcune voci
|
||||
# 2. modificato problemi in eccezioni
|
||||
# 3. aggiunta la def select
|
||||
# 3. aggiunta la def check
|
||||
# 4. modifica alla legenda e altre aggiunte
|
||||
|
||||
# Questo vuole solo essere uno scheletro per velocizzare la scrittura di un canale.
|
||||
@@ -197,7 +197,7 @@ def genres(item):
|
||||
# per quei casi dove il sito non differenzia film e/o serie e/o anime
|
||||
# e la ricerca porta i titoli mischiati senza poterli distinguere tra loro
|
||||
# andranno modificate anche le def peliculas e episodios ove occorre
|
||||
def select(item):
|
||||
def check(item):
|
||||
support.info('select --->', item)
|
||||
#support.dbg()
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"id": "1337x",
|
||||
"name": "1337x",
|
||||
"language": ["ita", "sub-ita", "eng"],
|
||||
"active": true,
|
||||
"thumbnail": "1337x.png",
|
||||
"banner": "1337x.png",
|
||||
"categories": ["movie", "tvshow", "torrent"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "itaSearch",
|
||||
"type": "bool",
|
||||
"label": "Cerca contenuti in italiano",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per 1337x
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import inspect
|
||||
from core import support
|
||||
from platformcode import logger, config
|
||||
|
||||
# host = support.config.get_channel_url()
|
||||
host = 'https://www.1337x.to'
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
menu = [('Film ITA {bullet bold}',['/movie-lib-sort/all/it/popularity/desc/all/1/', 'peliculas', '', 'movie']),
|
||||
('Film {submenu}',['/movie-library/1/', 'peliculas', 'filter', 'movie']),
|
||||
('Serie TV {bullet bold}',['/series-library/', 'az', '', 'tvshow'])]
|
||||
|
||||
search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def moviefilter(item):
|
||||
if logger.testMode:
|
||||
return host +'/movie-lib-sort/all/all/score/desc/all/1/'
|
||||
from platformcode import platformtools
|
||||
|
||||
item.args = ''
|
||||
controls = []
|
||||
data = support.match(item).data
|
||||
|
||||
patronBlock = r'<select name="{}"[^>]+>(.+?)</select>'
|
||||
patron = r'value="([^"]+)">([^<]+)'
|
||||
|
||||
genres = support.match(data, patronBlock=patronBlock.format('genre'), patron=patron).matches
|
||||
years = support.match(data, patronBlock=patronBlock.format('year'), patron=patron).matches
|
||||
langs = support.match(data, patronBlock=patronBlock.format('lang'), patron=patron).matches
|
||||
sorts = support.match(data, patronBlock=patronBlock.format('sortby'), patron=patron).matches
|
||||
orders = support.match(data, patronBlock=patronBlock.format('sort'), patron=patron).matches
|
||||
|
||||
item.genreValues = [x[0] for x in genres]
|
||||
item.yearValues = [x[0] for x in years]
|
||||
item.langValues = [x[0] for x in langs]
|
||||
item.sortValues = [x[0] for x in sorts]
|
||||
item.orderValues = [x[0] for x in orders]
|
||||
|
||||
genres = [g[1] for g in genres]
|
||||
years = [g[1] for g in years]
|
||||
langs = [g[1] for g in langs]
|
||||
sorts = [g[1] for g in sorts]
|
||||
orders = [g[1] for g in orders]
|
||||
|
||||
controls.append({'id': 'lang', 'label': 'Lingua', 'type': 'list', 'enabled':True, 'visible':True, 'lvalues':langs, 'default': 0})
|
||||
controls.append({'id': 'genre', 'label': 'Genere', 'type': 'list', 'enabled':True, 'visible':True, 'lvalues':genres, 'default': 0})
|
||||
controls.append({'id': 'year', 'label': 'Anno', 'type': 'list', 'enabled':True, 'visible':True, 'lvalues':years, 'default': 0})
|
||||
controls.append({'id': 'sort', 'label': 'Anno', 'type': 'list', 'enabled':True, 'visible':True, 'lvalues':sorts, 'default': 0})
|
||||
controls.append({'id': 'order', 'label': 'Anno', 'type': 'list', 'enabled':True, 'visible':True, 'lvalues':orders, 'default': 0})
|
||||
return platformtools.show_channel_settings(list_controls=controls, item=item, caption='Filtro', callback='filtered')
|
||||
|
||||
|
||||
|
||||
def filtered(item, values):
|
||||
genre = item.genreValues[values['genre']]
|
||||
lang = item.langValues[values['lang']]
|
||||
sortby = item.sortValues[values['sort']]
|
||||
order = item.orderValues[values['order']]
|
||||
year = item.yearValues[values['year']]
|
||||
|
||||
return '{}/movie-lib-sort/{}/{}/{}/{}/{}/1/'.format(host, genre, lang, sortby, order, year)
|
||||
|
||||
|
||||
def az(item):
|
||||
import string
|
||||
itemlist = [item.clone(title='1-9', url=item.url +'num/1/', action='peliculas', thumbnail=support.thumb('az'))]
|
||||
for letter in list(string.ascii_lowercase):
|
||||
itemlist.append(item.clone(title=letter.upper(), url=item.url + letter +'/1/', action='peliculas', thumbnail=support.thumb('az')))
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.info('search', text)
|
||||
item.args = 'search'
|
||||
if config.get_setting('itaSearch', channel=item.channel, default=False):
|
||||
text += ' ita'
|
||||
text = text.replace(' ', '+')
|
||||
item.url = '{}/search/{}/1/'.format(host, text)
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Cattura la eccezione così non interrompe la ricerca globle se il canale si rompe!
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("search except: ", line)
|
||||
return []
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
if item.args == 'filter':
|
||||
item.url = moviefilter(item)
|
||||
if not item.url:
|
||||
data = ' '
|
||||
else:
|
||||
data = support.match(item).data
|
||||
|
||||
if item.args == 'search':
|
||||
sceneTitle = 'undefined'
|
||||
patron = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)<(?:[^>]+>){3,7}(?P<seed>[^<]+)<(?:[^>]+>){6}(?P<size>[^<]+)<span'
|
||||
patronNext = r'"([^"]+)">>>'
|
||||
elif item.contentType == 'movie':
|
||||
patron = r'<img alt="[^"]*" data-original="(?P<thumb>[^"]+)(?:[^>]+>){15}(?P<title>[^<]+)(?:[^>]+>){18,23}\s*<a href="(?P<url>[^"]+)'
|
||||
patronNext = r'"([^"]+)">>>'
|
||||
else:
|
||||
action = 'seasons'
|
||||
patron = r'<img src="(?P<thumb>[^"]+)(?:[^>]+>){4}\s*<a href="(?P<url>[^"]+)[^>]+>(?P<title>[^<]+)'
|
||||
|
||||
if (item.args == 'search' or item.contentType != 'movie') and not support.stackCheck(['get_channel_results']):
|
||||
patronNext = None
|
||||
def itemlistHook(itemlist):
|
||||
lastUrl = support.match(data, patron=r'href="([^"]+)">Last').match
|
||||
if lastUrl:
|
||||
currentPage = support.match(item.url, string=True, patron=r'/(\d+)/').match
|
||||
nextPage = int(currentPage) + 1
|
||||
support.nextPage(itemlist, item, next_page=item.url.replace('/{}'.format(currentPage), '/{}'.format(nextPage)), function_or_level='peliculas')
|
||||
return itemlist
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def seasons(item):
|
||||
item.contentType = 'season'
|
||||
action = 'episodios'
|
||||
patron = r'<li>\s*<a href="(?P<url>[^"]+)[^>]+>\s*<img alt="[^"]*"\ssrc="(?P<thumb>[^"]+)(?:([^>]+)>){2}\s*(?P<title>\w+ (?P<season>\d+))'
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
patron = r'<img src="(?P<thumb>[^"]+)(?:[^>]+>){13}\s*(?P<season>\d+)x(?P<episode>\d+)\s*<span class="seperator">(?:[^>]+>){2}\s*<a href="(?P<url>[^"]+)">(?P<title>[^<]+)'
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.reverse()
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
item.disableAutoplay = True
|
||||
if item.args == 'search':
|
||||
itemlist.append(item.clone(server='torrent', action='play'))
|
||||
else:
|
||||
from lib.guessit import guessit
|
||||
|
||||
items = support.match(item.url, patron=r'<a href="([^"]+)">([^<]+)<(?:[^>]+>){3}([^<]+)<(?:[^>]+>){6}([^<]+)<span').matches
|
||||
|
||||
for url, title, seed, size in items:
|
||||
parsedTitle = guessit(title)
|
||||
|
||||
title = support.scrapertools.unescape(parsedTitle.get('title', ''))
|
||||
|
||||
lang = ''
|
||||
if parsedTitle.get('language'):
|
||||
langs = parsedTitle.get('language')
|
||||
if isinstance(langs, list):
|
||||
lang = 'MULTI'
|
||||
else:
|
||||
lang = vars(langs).get('alpha3').upper()
|
||||
if not (lang.startswith('MUL') or lang.startswith('ITA')):
|
||||
subs = parsedTitle.get('subtitle_language')
|
||||
if isinstance(subs, list):
|
||||
lang = 'Multi-Sub'
|
||||
else:
|
||||
lang = vars(subs).get('alpha3').upper()
|
||||
if lang:
|
||||
title = '{} [{}]'.format(title, lang)
|
||||
|
||||
sizematch = support.match(size, patron='(\d+(?:\.\d+)?)\s* (\w+)').match
|
||||
sizenumber = float(sizematch[0])
|
||||
if sizematch[1].lower() == 'gb':
|
||||
sizenumber = sizenumber * 1024
|
||||
|
||||
itemlist.append(item.clone(title = '{} [{} SEEDS] [{}]'.format(title, seed, size), seed=int(seed), size=sizenumber, url=host + url, server='torrent', action='play'))
|
||||
itemlist.sort(key=lambda it: (it.seed, it.size), reverse=True)
|
||||
|
||||
Videolibrary = True if 'movie' in item.args else False
|
||||
return support.server(item, itemlist=itemlist, Videolibrary=Videolibrary, Sorted=False)
|
||||
|
||||
|
||||
def play(item):
|
||||
from core import servertools
|
||||
data = support.match(item.url, patron=r'href="(magnet[^"]+)').match
|
||||
return servertools.find_video_items(item, data=data)
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "altadefinizione",
|
||||
"name": "Altadefinizione",
|
||||
"language": ["ita", "sub-ita"],
|
||||
"active": true,
|
||||
"thumbnail": "altadefinizione.png",
|
||||
"banner": "altadefinizione.png",
|
||||
"categories": ["movie", "tvshow", "vos"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per altadefinizione
|
||||
# ------------------------------------------------------------
|
||||
|
||||
|
||||
from core import httptools, support
|
||||
from platformcode import config, logger
|
||||
|
||||
|
||||
def findhost(url):
|
||||
host = support.match(url, patron=r'<h2[^>]+><a href="([^"]+)').match.rstrip('/')
|
||||
return host
|
||||
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = ['/category/film/',
|
||||
('Al Cinema', ['/al-cinema/', 'peliculas']),
|
||||
('Generi', ['', 'genres']),
|
||||
# ('Sub-ITA', ['/sub-ita/', 'peliculas'])
|
||||
]
|
||||
|
||||
tvshow = ['/category/serie-tv/',
|
||||
('Aggiornamenti Serie TV', ['/aggiornamenti-serie-tv/', 'peliculas']),]
|
||||
|
||||
search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
action = 'peliculas'
|
||||
blacklist = ['Scegli il Genere', 'Film', 'Serie TV', 'Sub-Ita', 'Anime']
|
||||
patronMenu = r'<option value="(?P<url>[^"]+)">(?P<title>[^<]+)'
|
||||
def itemlistHook(itemlist):
|
||||
itl = []
|
||||
for item in itemlist:
|
||||
if len(item.fulltitle) != 3:
|
||||
itl.append(item)
|
||||
return itl
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.debug(text)
|
||||
item.url = "{}/search/{}/feed/rss2/".format(host, text)
|
||||
item.args = 'search'
|
||||
|
||||
try:
|
||||
return peliculas(item)
|
||||
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("search except: %s" % line)
|
||||
return []
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
n = '22' if '/?s=' in item.url else '8'
|
||||
item.contentType = "undefined"
|
||||
action = 'check'
|
||||
patron = r'src="(?P<poster>http[^"]+)(?:[^>]+>){4}\s*<a href="(?P<url>[^"]+)[^>]+>\s*(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*</a>\s*</h2>'
|
||||
if item.args == 'search':
|
||||
patron = r'<title>(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*[^>]+>\s*<link>(?P<url>[^<]+)'
|
||||
patronNext = r'href="([^"]+)[^>]+>Successivo'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
item.quality = ''
|
||||
data = item.data
|
||||
action='findvideos'
|
||||
# debug=True
|
||||
patronBlock = r'<span>\s*\w+\s*[Ss]tagione.*?(?P<lang>(?:[Ss][Uu][Bb][-]?)?[Ii][Tt][Aa])(?: in )?(?P<quality>[^<]*)?(?:[^>]+>){4}(?P<block>.*?)/p>'
|
||||
patron = r'(?P<season>\d+)x(?P<episode>\d+)[^>]+>(?P<data>.*?)(?:</table)'
|
||||
return locals()
|
||||
|
||||
|
||||
def check(item):
|
||||
item.data = httptools.downloadpage(item.url).data
|
||||
if 'Stagione' in item.data:
|
||||
item.contentType = 'tvshow'
|
||||
return episodios(item)
|
||||
else:
|
||||
return findvideos(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.debug()
|
||||
if item.contentType == 'movie' and isinstance(item.data, str):
|
||||
item.data = support.match(item.data, patron=r'data-id="([^"]+)').matches
|
||||
return support.server(item, item.data)
|
||||
@@ -51,13 +51,14 @@ def peliculas(item):
|
||||
action="findvideos"
|
||||
|
||||
patron = r'<div class="cover boxcaption"> +<h2>\s*<a href="(?P<url>[^"]+)">(?P<title>[^<]+).*?src="(?P<thumb>[^"]+).*?<div class="trdublaj">(?P<quality>[^<]+).*?<span class="ml-label">(?P<year>[0-9]+).*?<span class="ml-label">(?P<duration>[^<]+).*?<p>(?P<plot>[^<]+)'
|
||||
patronNext = '<span>\d</span> <a href="([^"]+)">'
|
||||
|
||||
if item.args == "search":
|
||||
patronBlock = r'</script> <div class="boxgrid caption">(?P<block>.*)<div id="right_bar">'
|
||||
|
||||
elif item.args == 'update':
|
||||
patronBlock = r'<div class="widget-title">Ultimi Film Aggiunti/Aggiornati</div>(?P<block>.*?)<div id="alt_menu">'
|
||||
patron = r'style="background-image:url\((?P<thumb>[^\)]+).+?<p class="h4">(?P<title>.*?)</p>[^>]+> [^>]+> [^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> [^>]+> [^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+> [^>]+>[^>]+>(?P<duration>\d+|N/A).+?>.*?(?:>Film (?P<lang>Sub ITA)</a></p> )?<p>(?P<plot>[^<]+)<.*?href="(?P<url>[^"]+)'
|
||||
patron = r'style="background-image:url\((?P<thumb>[^\)]+).+?<p class="h4">(?P<title>.*?)</p>[^>]+> [^>]+> [^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> [^>]+> [^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+> [^>]+>[^>]+>(?P<duration>\d+|N/A)?.+?>.*?(?:>Film (?P<lang>Sub ITA)</a></p> )?<p>(?P<plot>[^<]+)<.*?href="(?P<url>[^"]+)'
|
||||
patronNext = '' # non ha nessuna paginazione
|
||||
elif item.args == 'orderalf':
|
||||
patron = r'<td class="mlnh-thumb"><a href="(?P<url>[^"]+)".*?src="(?P<thumb>[^"]+)"' \
|
||||
'.+?[^>]+>[^>]+ [^>]+[^>]+ [^>]+>(?P<title>[^<]+).*?[^>]+>(?P<year>\d{4})<' \
|
||||
@@ -65,7 +66,6 @@ def peliculas(item):
|
||||
else:
|
||||
patronBlock = r'<div class="cover_kapsul ml-mask">(?P<block>.*)<div class="page_nav">'
|
||||
|
||||
patronNext = '<span>\d</span> <a href="([^"]+)">'
|
||||
# debug = True
|
||||
return locals()
|
||||
|
||||
@@ -144,7 +144,7 @@ def newest(categoria):
|
||||
def findvideos(item):
|
||||
support.info('findvideos', item)
|
||||
data = httptools.downloadpage(item.url).data
|
||||
iframe = support.match(data, patron='player-container[^>]+>\s*<iframe[^>]+src="([^"]+)').match
|
||||
iframe = support.match(data, patron='src="(http[^"]+)" frameborder').match
|
||||
if iframe:
|
||||
item.url = iframe
|
||||
return support.server(item)
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"id": "altadefinizione01_link",
|
||||
"name": "Altadefinizione01 L",
|
||||
"active": false,
|
||||
"language": ["ita","sub-ita"],
|
||||
"thumbnail": "altadefinizione01_L.png",
|
||||
"banner": "altadefinizione01_L.png",
|
||||
"categories": ["movie","vos"],
|
||||
"settings" :[]
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- Channel altadefinizione01_link -*-
|
||||
|
||||
from core import support
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
__channel__ = "altadefinizione01_link"
|
||||
|
||||
# ======== def per utility INIZIO ============================
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
# =========== home menu ===================
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.info('mainlist',item)
|
||||
|
||||
film = [
|
||||
('Al Cinema', ['/film-del-cinema', 'peliculas', '']),
|
||||
('Generi', ['', 'genres', 'genres']),
|
||||
('Anni', ['', 'genres', 'years']),
|
||||
('Qualità', ['/piu-visti.html', 'genres', 'quality']),
|
||||
('Mi sento fortunato', ['/piu-visti.html', 'genres', 'lucky']),
|
||||
('Popolari', ['/piu-visti.html', 'peliculas', '']),
|
||||
('Sub-ITA', ['/film-sub-ita/', 'peliculas', ''])
|
||||
]
|
||||
return locals()
|
||||
|
||||
# ======== def in ordine di action dal menu ===========================
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
# debug = True
|
||||
support.info('peliculas',item)
|
||||
|
||||
patron = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)(?:[^>]+>){5}\s*<div class="[^"]+" style="background-image:url\((?P<thumb>[^\)]+)(?:[^>]+>){6}\s*(?P<year>\d{4})[^>]+>[^>]+>(?:\s*(?P<duration>\d+))?(?:[^>]+>){0,2}\s+(?P<quality>[a-zA-Z]+)\s+(?:[^>]+>){2}\s*(?P<lang>[^>]+)\s+[^>]+>'
|
||||
patronNext = r'<span>\d</span> <a href="([^"]+)">'
|
||||
# debug = True
|
||||
return locals()
|
||||
|
||||
# =========== def pagina categorie ======================================
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
support.info('genres',item)
|
||||
|
||||
action = 'peliculas'
|
||||
if item.args == 'genres':
|
||||
patronBlock = r'<ul class="listSubCat" id="Film">(?P<block>.*)<ul class="listSubCat" id="Anno">'
|
||||
elif item.args == 'years':
|
||||
patronBlock = r'<ul class="listSubCat" id="Anno">(?P<block>.*)<ul class="listSubCat" id="Qualita">'
|
||||
elif item.args == 'quality':
|
||||
patronBlock = r'<ul class="listSubCat" id="Qualita">(?P<block>.*)<blockquote'
|
||||
elif item.args == 'lucky': # sono i titoli random nella pagina
|
||||
patronBlock = r'FILM RANDOM.*?class="listSubCat">(?P<block>.*)</ul>'
|
||||
action = 'findvideos'
|
||||
patronMenu = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)<'
|
||||
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
# =========== def per cercare film/serietv =============
|
||||
#host+/index.php?do=search&story=avatar&subaction=search
|
||||
def search(item, text):
|
||||
support.info('search', item)
|
||||
itemlist = []
|
||||
text = text.replace(" ", "+")
|
||||
item.url = host+"/index.php?do=search&story=%s&subaction=search" % (text)
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Se captura la excepcion, para no interrumpir al buscador global si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
# =========== def per le novità nel menu principale =============
|
||||
|
||||
def newest(categoria):
|
||||
support.info('newest', categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == "peliculas":
|
||||
item.url = host
|
||||
item.action = "peliculas"
|
||||
item.contentType='movie'
|
||||
itemlist = peliculas(item)
|
||||
|
||||
if itemlist[-1].action == "peliculas":
|
||||
itemlist.pop()
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
support.info('findvideos', item)
|
||||
return support.server(item, support.match(item, patron='<ul class="playernav">.*?</ul>', headers=headers).match)
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "altadefinizioneclick",
|
||||
"name": "AltadefinizioneClick",
|
||||
"active": true,
|
||||
"active": false,
|
||||
"language": ["ita","sub-ita"],
|
||||
"thumbnail": "altadefinizioneclick.png",
|
||||
"bannermenu": "altadefinizioneciclk.png",
|
||||
|
||||
+112
-158
@@ -1,107 +1,41 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per altadefinizioneclick
|
||||
# Canale per Altadefinizione Click
|
||||
# ----------------------------------------------------------
|
||||
"""
|
||||
|
||||
Eccezioni che non superano il test del canale:
|
||||
- indicare le eccezioni
|
||||
|
||||
Novità. Indicare in quale/i sezione/i è presente il canale:
|
||||
- film
|
||||
|
||||
Avvisi:
|
||||
- Eventuali avvisi per i tester
|
||||
|
||||
Ulteriori info:
|
||||
|
||||
|
||||
"""
|
||||
from platformcode.logger import debug
|
||||
from core import support
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
from platformcode import config, logger
|
||||
|
||||
def findhost(url):
|
||||
data = support.httptools.downloadpage(url).data
|
||||
host = support.scrapertools.find_single_match(data, '<div class="elementor-button-wrapper">\s*<a href="([^"]+)"')
|
||||
return host
|
||||
return support.match(url, patron=r'<div class="elementor-button-wrapper">\s*<a href="([^"]+)"').match
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
headers = [['Referer', host]]
|
||||
if host.endswith('/'):
|
||||
host = host[:-1]
|
||||
headers = {'Referer': host, 'x-requested-with': 'XMLHttpRequest'}
|
||||
order = ['', 'i_piu_visti', 'i_piu_votati', 'i_piu_votati_dellultimo_mese', 'titolo_az', 'voto_imdb_piu_alto'][config.get_setting('order', 'altadefinizionecommunity')]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
film = ['',
|
||||
('Novità', ['/nuove-uscite/', 'peliculas', 'news']),
|
||||
('Al Cinema', ['/al-cinema/', 'peliculas', 'cinema']),
|
||||
('A-Z',['/lista-film/', 'genres', 'az']),
|
||||
('Generi', ['', 'genres', 'genres']),
|
||||
('Anni', ['', 'genres', 'years']),
|
||||
('Qualità', ['', 'genres', 'quality']),
|
||||
('Mi sento Fortunato',[ '', 'genres', 'lucky']),
|
||||
('Sub-ITA', ['/sub-ita/', 'peliculas', 'sub'])
|
||||
]
|
||||
logger.debug(item)
|
||||
|
||||
tvshow = ['/serie-tv/']
|
||||
film = ['/type/movie',
|
||||
('Generi', ['/type/movie', 'genres', 'genres']),
|
||||
('Anni', ['/type/movie', 'genres', 'year']),]
|
||||
|
||||
search = ''
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
action = 'check'
|
||||
|
||||
patron = r'<div class="wrapperImage">\s*(?:<span class="year">(?P<year>[^<]+)[^>]+>)?(?:<span class="hd">(?P<quality>[^<>]+))?.+?href="(?P<url>[^"]+)".+?src="(?P<thumb>[^"]+)".+?<h2 class="titleFilm">[^>]+>(?P<title>.+?)[ ]?(?:|\[(?P<lang>[^\]]+)\])?</a>.*?(?:IMDB\:</strong>[ ](?P<rating>.+?)<|</div>)'
|
||||
|
||||
if item.args == 'az':
|
||||
patron = r'<img style="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)" [^>]+>(?P<title>[^<\[]+)(?:\[(?P<lang>[^\]]+)\]\s*)?<'\
|
||||
r'[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<year>\d{4})[^>]+>[^>]+>\s*(?P<quality>[^<]+).*?<span class="label">(?P<ratting>[^<]+)<'
|
||||
patronBlock =''
|
||||
|
||||
elif item.args == 'search':
|
||||
patronBlock = r'<section id="lastUpdate">(?P<block>.*?)(?:<div class="row ismobile">|<section)'
|
||||
patron = r'<a href="(?P<url>[^"]+)">\s*<div class="wrapperImage">(?:\s*<span class="year">(?P<year>[^<]+)<\/span>)?(?:\s*<span class="hd">(?P<quality>[^<]+)<\/span>)?[^>]+>\s*<img[^s]+src="(?P<thumb>[^"]+)"(?:(?:[^>]+>){5}\s*(?P<rating>[^<]+))?(?:[^>]+>){4}(?P<title>[^<]+)'
|
||||
|
||||
if not item.args:
|
||||
# patronBlock = r'(?:ULTIMI INSERITI|Serie TV)(?P<block>.*?)</section'
|
||||
patronBlock = r'({})(?P<block>.*?)</section'.format('ULTIMI INSERITI' if item.contentType == 'movie' else 'Serie TV')
|
||||
|
||||
# nella pagina "CERCA", la voce "SUCCESSIVO" apre la maschera di inserimento dati
|
||||
patronNext = r'<a class="next page-numbers" href="([^"]+)">'
|
||||
tvshow = ['/serie-tv/tvshow',
|
||||
('Generi', ['/serie-tv/tvshow', 'genres', 'genres']),
|
||||
('Anni', ['/serie-tv/tvshow', 'genres', 'year'])]
|
||||
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
action = 'peliculas'
|
||||
patronMenu = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)<'
|
||||
|
||||
if item.args == 'genres':
|
||||
patronBlock = r'<ul class="listSubCat" id="Film">(?P<block>.*)<ul class="listSubCat" id="Anno">'
|
||||
elif item.args == 'years':
|
||||
patronBlock = r'<ul class="listSubCat" id="Anno">(?P<block>.*)<ul class="listSubCat" id="Qualita">'
|
||||
elif item.args == 'quality':
|
||||
patronBlock = r'<ul class="listSubCat" id="Qualita">(?P<block>.*)</li>\s*?</ul>\s*?</div>\s*?</div>\s*?</div>\s*?<a'
|
||||
elif item.args == 'lucky': # sono i titoli random nella pagina
|
||||
patronBlock = r'<h3 class="titleSidebox dado">FILM RANDOM</h3>(?P<block>.*)</section>'
|
||||
patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<[]+)(?:\[(?P<lang>.+?)\])?<'
|
||||
action = 'findvideos'
|
||||
elif item.args == 'az':
|
||||
blacklist = ['FILM 4K IN STREAMING']
|
||||
patron = r'<a title="(?P<title>[^"]+)" href="(?P<url>[^"]+)"'
|
||||
item.args = 'az'
|
||||
if not item.args == 'az':
|
||||
item.args = 'genres'
|
||||
|
||||
return locals()
|
||||
|
||||
def search(item, texto):
|
||||
support.info("search ", texto)
|
||||
logger.debug("search ", texto)
|
||||
|
||||
item.args = 'search'
|
||||
item.url = host + "?s=" + texto
|
||||
item.url = host + "/search?s={}&f={}&page=1".format(texto, item.contentType)
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
@@ -111,87 +45,107 @@ def search(item, texto):
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
support.info(categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == "peliculas":
|
||||
item.args = 'news'
|
||||
item.contentType = 'movie'
|
||||
item.url = host + "/nuove-uscite/"
|
||||
item.action = "peliculas"
|
||||
itemlist = peliculas(item)
|
||||
|
||||
if itemlist[-1].action == "peliculas":
|
||||
itemlist.pop()
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
from platformcode import logger
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def check(item):
|
||||
item.contentType = 'tvshow'
|
||||
def get_season(pageData, seas_url, season):
|
||||
data = ''
|
||||
episodes = support.match(pageData if pageData else seas_url, patronBlock=patron_episode, patron=patron_option).matches
|
||||
for episode_url, episode in episodes:
|
||||
# episode_url = support.urlparse.urljoin(item.url, episode_url)
|
||||
# if '-' in episode: episode = episode.split('-')[0].zfill(2) + 'x' + episode.split('-')[1].zfill(2)
|
||||
title = season + "x" + episode.zfill(2) + ' - ' + item.fulltitle
|
||||
data += title + '|' + episode_url + '\n'
|
||||
return data
|
||||
|
||||
patron_season = '<div class="[^"]+" id="seasonsModal"[^>]+>(.*?)</ul>'
|
||||
patron_episode = '<div class="[^"]+" id="episodesModal"[^>]+>(.*?)</ul>'
|
||||
patron_option = r'<a href="([^"]+?)".*?>(?:Stagione |Episodio )([^<]+?)</a>'
|
||||
|
||||
url = support.match(item, patron=r'<iframe id="iframeVid" width="[^"]+" height="[^"]+" src="([^"]+)" allowfullscreen').match
|
||||
seasons = support.match(url, patronBlock=patron_season, patron=patron_option)
|
||||
if not seasons.match:
|
||||
item.contentType = 'movie'
|
||||
return findvideos(item)
|
||||
|
||||
data = ''
|
||||
|
||||
import sys
|
||||
if sys.version_info[0] >= 3: from concurrent import futures
|
||||
else: from concurrent_py2 import futures
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
thL = []
|
||||
for i, season in enumerate(seasons.matches):
|
||||
thL.append(executor.submit(get_season, seasons.data if i == 0 else '', season[0], season[1]))
|
||||
for res in futures.as_completed(thL):
|
||||
if res.result():
|
||||
data += res.result()
|
||||
item.data = data
|
||||
return episodios(item)
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
data = item.data
|
||||
def genres(item):
|
||||
logger.debug(item)
|
||||
data = support.httptools.downloadpage(item.url, cloudscraper=True).data
|
||||
blacklist= ['Film', 'Serie TV']
|
||||
|
||||
patron = r'(?P<season>\d+)x(?P<episode>\d+)\s*-\s*(?P<title>[^\|]+)\|(?P<url>[^ ]+)'
|
||||
action = 'findvideos'
|
||||
if item.args == 'genres':
|
||||
categories ={}
|
||||
res = support.match(host + '/cerca', patron=r'for="cat-(\d+)[^>]+>([^<]+)').matches
|
||||
for _id, name in res:
|
||||
categories[name] = _id
|
||||
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.sort(key=lambda item: (item.infoLabels['season'], item.infoLabels['episode']))
|
||||
return itemlist
|
||||
patronBlock = r'{}<span></span>(?P<block>.*?)</ul>\s*</li'.format('Film' if item.contentType == 'movie' else 'Serie TV')
|
||||
patronMenu = r'<a href="[^"]+">(?P<title>[^<]+)'
|
||||
|
||||
def itemHook(it):
|
||||
it.cat_id = categories[it.fulltitle]
|
||||
return it
|
||||
|
||||
if item.args == 'year':
|
||||
patron = r'value="(?P<year_id>[^"]+)"[^>]*>(?P<title>\d+)'
|
||||
patronBlock = r'Anno</option>(?P<block>.*?</select>)'
|
||||
|
||||
elif item.args == 'quality':
|
||||
patronMenu = r'quality/(?P<quality_id>[^"]+)">(?P<title>[^<]+)'
|
||||
patronBlock = r'Risoluzione(?P<block>.*?)</ul>'
|
||||
action = 'peliculas'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
item.quality = 'HD'
|
||||
json = {}
|
||||
params ={'type':item.contentType, 'anno':item.year_id, 'quality':item.quality_id, 'cat':item.cat_id, 'order':order}
|
||||
|
||||
|
||||
if item.contentType == 'movie':
|
||||
action = 'findvideos'
|
||||
else:
|
||||
action = 'episodios'
|
||||
if not item.page: item.page = 1
|
||||
try:
|
||||
# support.dbg()
|
||||
if item.args in ['search']:
|
||||
page = support.httptools.downloadpage(item.url, headers=headers)
|
||||
if page.json:
|
||||
data = "\n".join(page.json['data'])
|
||||
else:
|
||||
data = page.data
|
||||
else:
|
||||
params['page'] = item.page
|
||||
|
||||
url = '{}/load-more-film?{}'.format(host, support.urlencode(params))
|
||||
json = support.httptools.downloadpage(url, headers=headers).json
|
||||
data = "\n".join(json['data'])
|
||||
except:
|
||||
data = ' '
|
||||
|
||||
patron = r'wrapFilm">\s*<a href="(?P<url>[^"]+)">[^>]+>(?P<year>\d+)(?:[^>]+>){2}(?P<rating>[^<]+)(?:[^>]+>){4}\s*<img src="(?P<thumb>[^"]+)(?:[^>]+>){3}(?P<title>[^<[]+)(?:\[(?P<lang>[sSuUbBiItTaA-]+))?'
|
||||
# patron = r'wrapFilm">\s*<a href="(?P<url>[^"]+)">[^>]+>(?P<year>\d+)(?:[^>]+>){2}(?P<rating>[^<]+)(?:[^>]+>){2}(?P<quality>[^<]+)(?:[^>]+>){2}\s*<img src="(?P<thumb>[^"]+)(?:[^>]+>){3}(?P<title>[^<[]+)(?:\[(?P<lang>[sSuUbBiItTaA-]+))?'
|
||||
|
||||
# paginazione
|
||||
if json.get('have_next') or 'have_next_film=true' in data:
|
||||
def fullItemlistHook(itemlist):
|
||||
cat_id = support.match(data, patron=r''''cat':"(\d+)"''').match
|
||||
if cat_id: item.cat_id = cat_id
|
||||
item.page += 1
|
||||
support.nextPage(itemlist, item, function_or_level='peliculas')
|
||||
return itemlist
|
||||
|
||||
return locals()
|
||||
|
||||
def findvideos(item):
|
||||
support.info('findvideos', item)
|
||||
return support.hdpass_get_servers(item)
|
||||
|
||||
# def play(item):
|
||||
# if 'hdpass' in item.url:
|
||||
# return support.hdpass_get_url(item)
|
||||
# return [item]
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
logger.debug(item)
|
||||
# debug = True
|
||||
data = item.data
|
||||
patron = r'class="playtvshow "\s+data-href="(?P<url>[^"]+)'
|
||||
|
||||
def itemHook(it):
|
||||
spl = it.url.split('/')[-2:]
|
||||
it.infoLabels['season'] = int(spl[0])+1
|
||||
it.infoLabels['episode'] = int(spl[1])+1
|
||||
it.url = it.url.replace('/watch-unsubscribed', '/watch-external')
|
||||
it.title = '{}x{:02d} - {}'.format(it.contentSeason, it.contentEpisodeNumber, it.fulltitle)
|
||||
return it
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
playWindow = support.match(item, patron='(?:playWindow|iframe)" (?:href|src)="([^"]+)').match
|
||||
if host in playWindow:
|
||||
url = support.match(playWindow, patron='allowfullscreen[^<]+src="([^"]+)"').match
|
||||
else:
|
||||
url = playWindow
|
||||
itemlist.append(item.clone(action='play', url=url, quality=''))
|
||||
|
||||
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"id": "altadefinizionecommunity",
|
||||
"name": "Altadefinizione Community",
|
||||
"language": ["ita", "sub-ita"],
|
||||
"active": true,
|
||||
"active": false,
|
||||
"thumbnail": "altadefinizionecommunity.png",
|
||||
"banner": "",
|
||||
"categories": ["movie", "tvshow", "vos"],
|
||||
@@ -23,5 +23,15 @@
|
||||
"label": "password",
|
||||
"type": "text",
|
||||
"visible": true
|
||||
}]
|
||||
},
|
||||
{
|
||||
"id": "order",
|
||||
"type": "list",
|
||||
"label": "Ordine di Visualizzazione",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [ "Nessuno", "I più visti", "I più votati", "I più votati dell'ultimo mese", "Titolo A-Z", "Voto IMDB più alto"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -13,52 +13,198 @@ def findhost(url):
|
||||
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
register_url = 'https://altaregistrazione.com'
|
||||
headers = {'Referer': host, 'x-requested-with': 'XMLHttpRequest'}
|
||||
register_url = 'https://altaregistrazione.net'
|
||||
|
||||
if 'altadefinizionecommunity' not in host:
|
||||
config.get_channel_url(findhost, forceFindhost=True)
|
||||
|
||||
if host.endswith('/'):
|
||||
host = host[:-1]
|
||||
|
||||
headers = {'Referer': host}
|
||||
order = ['', 'i_piu_visti', 'i_piu_votati', 'i_piu_votati_dellultimo_mese', 'titolo_az', 'voto_imdb_piu_alto'][config.get_setting('order', 'altadefinizionecommunity')]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
logger.debug(item)
|
||||
|
||||
film = ['/load-more-film?anno=&order=&support_webp=1&type=movie&page=1',
|
||||
# Voce Menu,['url','action','args',contentType]
|
||||
('Generi Film', ['', 'genres', 'genres']),
|
||||
]
|
||||
film = ['/type/movie',
|
||||
('Generi', ['/type/movie', 'genres', 'genres']),
|
||||
('Anni', ['/type/movie', 'genres', 'year']),]
|
||||
|
||||
tvshow = ['/load-more-film?type=tvshow&anno=&order=&support_webp=1&page=1',
|
||||
# Voce Menu,['url','action','args',contentType]
|
||||
('Generi Serie TV', ['', 'genres', 'genres']),
|
||||
]
|
||||
|
||||
altri = [
|
||||
# ('A-Z', ['/lista-film', 'genres', 'letters']),
|
||||
('Qualità', ['', 'genres', 'quality']),
|
||||
('Anni', ['/anno', 'genres', 'years'])
|
||||
]
|
||||
search = ''
|
||||
tvshow = ['/serie-tv/tvshow',
|
||||
('Generi', ['/serie-tv/tvshow', 'genres', 'genres']),
|
||||
('Anni', ['/serie-tv/tvshow', 'genres', 'year'])]
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.debug("search ", text)
|
||||
# per evitare fastidi da ricerca globale
|
||||
if not item.globalsearch:
|
||||
registerOrLogin()
|
||||
|
||||
item.args = 'search'
|
||||
item.url = host + "/search?s={}&f={}".format(text.replace(' ', '+'), item.contentType)
|
||||
try:
|
||||
return peliculas(item)
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
registerOrLogin()
|
||||
logger.debug(item)
|
||||
data = support.httptools.downloadpage(item.url).data
|
||||
blacklist= ['Film', 'Serie TV']
|
||||
|
||||
if item.args == 'genres':
|
||||
categories ={}
|
||||
res = support.match(host + '/cerca', patron=r'for="cat-(\d+)[^>]+>([^<]+)').matches
|
||||
for _id, name in res:
|
||||
categories[name] = _id
|
||||
|
||||
patronBlock = r'{}<span></span>(?P<block>.*?)</ul>\s*</li'.format('Film' if item.contentType == 'movie' else 'Serie TV')
|
||||
patronMenu = r'<a href="[^"]+">(?P<title>[^<]+)'
|
||||
|
||||
def itemHook(it):
|
||||
it.cat_id = categories[it.fulltitle]
|
||||
return it
|
||||
|
||||
if item.args == 'year':
|
||||
patronMenu = r'value="(?P<year_id>[^"]+)"[^>]*>(?P<title>\d+)'
|
||||
patronBlock = r'Anno</option>(?P<block>.*?</select>)'
|
||||
|
||||
elif item.args == 'quality':
|
||||
patronMenu = r'quality/(?P<quality_id>[^"]+)">(?P<title>[^<]+)'
|
||||
patronBlock = r'Risoluzione(?P<block>.*?)</ul>'
|
||||
|
||||
action = 'peliculas'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
item.quality = 'HD'
|
||||
json = {}
|
||||
if not item.page: item.page = 1
|
||||
params ={'type':item.contentType, 'anno':item.year_id, 'quality':item.quality_id, 'cat':item.cat_id, 'order':order, 'page':item.page}
|
||||
# debug = True
|
||||
|
||||
action = 'findvideos' if item.contentType == 'movie' else 'episodios'
|
||||
|
||||
try:
|
||||
# support.dbg()
|
||||
if item.args in ['search']:
|
||||
page = support.httptools.downloadpage(item.url, headers=headers)
|
||||
if page.json:
|
||||
data = "\n".join(page.json['data'])
|
||||
else:
|
||||
data = page.data
|
||||
else:
|
||||
params['page'] = item.page
|
||||
|
||||
url = '{}/load-more-film?{}'.format(host, support.urlencode(params))
|
||||
json = support.httptools.downloadpage(url, headers=headers).json
|
||||
data = "\n".join(json['data'])
|
||||
except:
|
||||
data = ' '
|
||||
|
||||
patron = r'wrapFilm"[^>]*>\s*<a href="(?P<url>[^"]+)">[^>]+>(?P<year>\d+)(?:[^>]+>){2}(?P<rating>[^<]+)(?:[^>]+>){4}\s*<img src="(?P<thumb>[^"]+)(?:[^>]+>){2,6}\s+<h3>(?P<title>[^<[]+)(?:\[(?P<lang>[sSuUbBiItTaA -]+))?'
|
||||
# patron = r'wrapFilm">\s*<a href="(?P<url>[^"]+)">[^>]+>(?P<year>\d+)(?:[^>]+>){2}(?P<rating>[^<]+)(?:[^>]+>){4}\s*<img src="(?P<thumb>[^"]+)(?:[^>]+>){3}(?P<title>[^<[]+)(?:\[(?P<lang>[sSuUbBiItTaA-]+))?'
|
||||
|
||||
def itemHook(item):
|
||||
item.quality = item.quality.replace('2K', 'HD').replace('4K', 'HD')
|
||||
item.title = item.title.replace('2K', 'HD').replace('4K', 'HD')
|
||||
return item
|
||||
|
||||
# paginazione
|
||||
if json.get('have_next') or support.match(data, patron=r'have_next_film\s*=\s*true').match:
|
||||
def fullItemlistHook(itemlist):
|
||||
cat_id = support.match(data, patron=r''''cat':"(\d+)"''').match
|
||||
if cat_id: item.cat_id = cat_id
|
||||
item.page += 1
|
||||
support.nextPage(itemlist, item, function_or_level='peliculas')
|
||||
return itemlist
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
registerOrLogin()
|
||||
logger.debug(item)
|
||||
# debug = True
|
||||
data = item.data
|
||||
patron = r'class="playtvshow "\s+data-href="(?P<url>[^"]+)'
|
||||
|
||||
def itemHook(it):
|
||||
spl = it.url.split('/')[-2:]
|
||||
it.infoLabels['season'] = int(spl[0])+1
|
||||
it.infoLabels['episode'] = int(spl[1])+1
|
||||
it.url = it.url.replace('/watch-unsubscribed', '/watch-external')
|
||||
it.title = '{}x{:02d} - {}'.format(it.contentSeason, it.contentEpisodeNumber, it.fulltitle)
|
||||
return it
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
resolve_url(item)
|
||||
|
||||
itemlist.append(item.clone(action='play', url=support.match(item.url, patron='allowfullscreen[^<]+src="([^"]+)"', cloudscraper=True).match, quality=''))
|
||||
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
def play(item):
|
||||
if host in item.url: # intercetto il server proprietario
|
||||
# if registerOrLogin():
|
||||
return support.get_jwplayer_mediaurl(support.httptools.downloadpage(item.url, cloudscraper=True).data, 'Diretto')
|
||||
# else:
|
||||
# platformtools.play_canceled = True
|
||||
# return []
|
||||
else:
|
||||
return [item]
|
||||
|
||||
|
||||
def resolve_url(item):
|
||||
registerOrLogin()
|
||||
if '/watch-unsubscribed' not in item.url and '/watch-external' not in item.url:
|
||||
playWindow = support.match(support.httptools.downloadpage(item.url, cloudscraper=True).data, patron='playWindow" href="([^"]+)')
|
||||
video_url = playWindow.match
|
||||
item.data = playWindow.data
|
||||
item.url = video_url.replace('/watch-unsubscribed', '/watch-external')
|
||||
return item
|
||||
|
||||
|
||||
def login():
|
||||
r = support.httptools.downloadpage(host, cloudscraper=True)
|
||||
Token = support.match(r.data, patron=r'name=\s*"_token"\s*value=\s*"([^"]+)', cloudscraper=True).match
|
||||
if 'id="logged"' in r.text:
|
||||
if 'id="logged"' in r.data:
|
||||
logger.info('Già loggato')
|
||||
else:
|
||||
logger.info('Login in corso')
|
||||
post = {'_token': '',
|
||||
'form_action':'login',
|
||||
'form_action':'login',
|
||||
'email': config.get_setting('username', channel='altadefinizionecommunity'),
|
||||
'password':config.get_setting('password', channel='altadefinizionecommunity')}
|
||||
|
||||
r = support.httptools.downloadpage(host + '/login', post=post, headers={'referer': host}, cloudscraper=True)
|
||||
if not r.status_code in [200, 302] or 'Email o Password non validi' in r.text:
|
||||
if r.code not in [200, 302] or 'Email o Password non validi' in r.data:
|
||||
platformtools.dialog_ok('AltadefinizioneCommunity', 'Username/password non validi')
|
||||
return False
|
||||
|
||||
return 'id="logged"' in r.text
|
||||
return 'id="logged"' in r.data
|
||||
|
||||
|
||||
def registerOrLogin():
|
||||
@@ -125,128 +271,3 @@ def registerOrLogin():
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
json = {}
|
||||
|
||||
if item.contentType == 'undefined':
|
||||
disabletmdb = True
|
||||
action = 'check'
|
||||
elif item.contentType == 'movie':
|
||||
action = 'findvideos'
|
||||
else:
|
||||
action = 'episodios'
|
||||
|
||||
if '/load-more-film' not in item.url and '/search' not in item.url: # generi o altri menu, converto
|
||||
import ast
|
||||
ajax = support.match(item.url, patron='ajax_data\s*=\s*"?\s*([^;]+)', cloudscraper=True).match
|
||||
item.url = host + '/load-more-film?' + support.urlencode(ast.literal_eval(ajax)) + '&page=1'
|
||||
if not '/search' in item.url:
|
||||
json = support.httptools.downloadpage(item.url, headers=headers, cloudscraper=True).json
|
||||
data = "\n".join(json['data'])
|
||||
else:
|
||||
json = support.httptools.downloadpage(item.url, headers=headers, cloudscraper=True).json
|
||||
data = "\n".join(json['data'])
|
||||
patron = r'wrapFilm">\s*<a href="(?P<url>[^"]+)">\s*<span class="year">(?P<year>[0-9]{4})</span>\s*<span[^>]+>[^<]+</span>\s*<span class="qual">(?P<quality>[^<]+).*?<img src="(?P<thumbnail>[^"]+)[^>]+>\s*<h3>(?P<title>[^<[]+)(?:\[(?P<lang>[sSuUbBiItTaA-]+))?'
|
||||
|
||||
# paginazione
|
||||
if json.get('have_next'):
|
||||
def fullItemlistHook(itemlist):
|
||||
spl = item.url.split('=')
|
||||
url = '='.join(spl[:-1])
|
||||
page = str(int(spl[-1])+1)
|
||||
support.nextPage(itemlist, item, next_page='='.join((url, page)), function_or_level='peliculas')
|
||||
return itemlist
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.debug("search ", texto)
|
||||
|
||||
item.args = 'search'
|
||||
item.url = host + "/search?s={}&page=1".format(texto)
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
logger.debug(item)
|
||||
data = support.httptools.downloadpage(item.url, cloudscraper=True).data
|
||||
|
||||
patronMenu = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)'
|
||||
if item.args == 'quality':
|
||||
item.contentType = 'undefined'
|
||||
patronBlock = r'Risoluzione(?P<block>.*?)</ul>'
|
||||
elif item.args == 'years':
|
||||
item.contentType = 'undefined'
|
||||
patronBlock = r'ANNO(?P<block>.*?</section>)'
|
||||
else:
|
||||
patronBlock = ('Film' if item.contentType == 'movie' else 'Serie TV') + r'<span></span></a>\s+<ul class="dropdown-menu(?P<block>.*?)active-parent-menu'
|
||||
action = 'peliculas'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
logger.debug(item)
|
||||
data = item.data
|
||||
patron = r'class="playtvshow " data-href="(?P<url>[^"]+)'
|
||||
|
||||
def itemHook(it):
|
||||
spl = it.url.split('/')[-2:]
|
||||
it.infoLabels['season'] = int(spl[0])+1
|
||||
it.infoLabels['episode'] = int(spl[1])+1
|
||||
it.url = it.url.replace('/watch-unsubscribed', '/watch-external')
|
||||
it.title = '{}x{:02d} - {}'.format(it.contentSeason, it.contentEpisodeNumber, it.fulltitle)
|
||||
return it
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def check(item):
|
||||
resolve_url(item)
|
||||
if '/tvshow' in item.url:
|
||||
item.contentType = 'tvshow'
|
||||
return episodios(item)
|
||||
else:
|
||||
item.contentType = 'movie'
|
||||
return findvideos(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
resolve_url(item)
|
||||
|
||||
itemlist.append(item.clone(action='play', url=support.match(item.url, patron='allowfullscreen[^<]+src="([^"]+)"', cloudscraper=True).match, quality=''))
|
||||
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
def play(item):
|
||||
if host in item.url: # intercetto il server proprietario
|
||||
if registerOrLogin():
|
||||
return support.get_jwplayer_mediaurl(support.httptools.downloadpage(item.url, cloudscraper=True).data, 'Diretto')
|
||||
else:
|
||||
platformtools.play_canceled = True
|
||||
return []
|
||||
else:
|
||||
return [item]
|
||||
|
||||
|
||||
def resolve_url(item):
|
||||
if '/watch-unsubscribed' not in item.url and '/watch-external' not in item.url:
|
||||
playWindow = support.match(support.httptools.downloadpage(item.url, cloudscraper=True).data, patron='playWindow" href="([^"]+)')
|
||||
video_url = playWindow.match
|
||||
item.data = playWindow.data
|
||||
item.url = video_url.replace('/watch-unsubscribed', '/watch-external')
|
||||
return item
|
||||
@@ -10,7 +10,7 @@ headers = [['Referer', host]]
|
||||
|
||||
perpage_list = ['20','30','40','50','60','70','80','90','100']
|
||||
perpage = perpage_list[support.config.get_setting('perpage' , 'animealtadefinizione')]
|
||||
epPatron = r'<td>\s*(?P<title>[^<]+)[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"'
|
||||
epPatron = r'<td>\s*(?P<title>[^<]+)[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>\s*<img[^>]+/Streaming'
|
||||
|
||||
|
||||
@support.menu
|
||||
@@ -67,7 +67,7 @@ def peliculas(item):
|
||||
action='findvideos'
|
||||
elif item.args == 'last':
|
||||
item.contentType = 'episode'
|
||||
action='findvideos'
|
||||
action='episodios'
|
||||
else:
|
||||
item.contentType = 'tvshow'
|
||||
action='episodios'
|
||||
@@ -85,6 +85,10 @@ def peliculas(item):
|
||||
typeContentDict = {'movie':['movie']}
|
||||
typeActionDict = {'findvideos':['movie']}
|
||||
|
||||
def itemHook(item):
|
||||
item.url = support.re.sub('episodio-[0-9-]+', '', item.url)
|
||||
return item
|
||||
|
||||
def itemlistHook(itemlist):
|
||||
if item.search:
|
||||
itemlist = [ it for it in itemlist if ' Episodio ' not in it.title ]
|
||||
@@ -98,6 +102,7 @@ def peliculas(item):
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
anime = True
|
||||
# debug = True
|
||||
pagination = int(perpage)
|
||||
patron = epPatron
|
||||
return locals()
|
||||
|
||||
+45
-38
@@ -11,7 +11,7 @@ headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
anime = ['/lista-anime/',
|
||||
anime = ['/anime',
|
||||
('In Corso',['/anime/anime-status/in-corso/', 'peliculas', 'status']),
|
||||
('Completi',['/anime/anime-status/completo/', 'peliculas', 'status']),
|
||||
('Genere',['/anime', 'submenu', 'genre']),
|
||||
@@ -27,9 +27,10 @@ def mainlist(item):
|
||||
def submenu(item):
|
||||
action = 'peliculas'
|
||||
patronBlock = r'data-taxonomy="' + item.args + r'"(?P<block>.*?)</select'
|
||||
patronMenu = r'<option class="level-\d+ (?P<u>[^"]+)"[^>]+>(?P<t>[^(]+)[^\(]+\((?P<num>\d+)'
|
||||
patronMenu = r'<option class="level-\d+ (?P<url>[^"]+)"[^>]+>(?P<t>[^(]+)[^\(]+\((?P<num>\d+)'
|
||||
def itemHook(item):
|
||||
item.url += host + '/anime/' + item.args + '/' + item.u
|
||||
if not item.url.startswith('http'):
|
||||
item.url = host + '/anime/' + item.args + '/' + item.url
|
||||
item.title = support.typo(item.t, 'bold')
|
||||
return item
|
||||
return locals()
|
||||
@@ -73,19 +74,17 @@ def search(item, text):
|
||||
def peliculas(item):
|
||||
search = item.search
|
||||
anime = True
|
||||
if 'movie' in item.url:
|
||||
action = 'findvideos'
|
||||
else:
|
||||
action = 'check'
|
||||
action = 'check'
|
||||
|
||||
if not item.args:
|
||||
pagination = ''
|
||||
patron = r'<a\s*href="(?P<url>[^"]+)"\s*title="(?P<title>[^"]+)">'
|
||||
else:
|
||||
patron = r'<a href="(?P<url>[^"]+)"[^>]+>\s*<img src="(?P<thumb>[^"]+)" alt="(?P<title>.*?)(?: Sub| sub| SUB|")'
|
||||
patron = r'<a href="(?P<url>[^"]+)"[^>]+>\s*<img src="(?P<thumb>[^"]+)" alt="(?P<title>.*?)(?: Sub| sub| SUB|")'
|
||||
|
||||
if search:
|
||||
patron = r'<a href="(?P<url>[^"]+)"\s*title="(?P<title>.*?)(?: Sub| sub| SUB|")'
|
||||
|
||||
if item.args == 'newest': item.action = 'findvideos'
|
||||
|
||||
patronNext = '<li class="page-item disabled">(?:[^>]+>){4}<a class="page-link" href="([^"]+)'
|
||||
|
||||
def itemHook(item):
|
||||
if 'sub-ita' in item.url:
|
||||
if item.args != 'newest': item.title = item.title + support.typo('Sub-ITA','_ [] color kod')
|
||||
@@ -96,7 +95,7 @@ def peliculas(item):
|
||||
|
||||
|
||||
def check(item):
|
||||
m = support.match(item, headers=headers, patron=r'Tipologia[^>]+><a href="([^"]+)"')
|
||||
m = support.match(item, headers=headers, patron=r'Tipologia[^>]+>\s*<a href="([^"]+)"')
|
||||
item.data = m.data
|
||||
if 'movie' in m.match:
|
||||
item.contentType = 'movie'
|
||||
@@ -108,12 +107,13 @@ def check(item):
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
anime = True
|
||||
pagination = 50
|
||||
data = item.data
|
||||
|
||||
if '<h6>Streaming</h6>' in data:
|
||||
patron = r'<td style[^>]+>\s*.*?(?:<span[^>]+)?<strong>(?P<title>[^<]+)<\/strong>.*?<td style[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>'
|
||||
patron = r'<td style[^>]+>\s*.*?(?:<span[^>]+)?<strong>(?P<title>[^<]+)<\/strong>.*?<td style[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>(?P<episode>\d+)'
|
||||
else:
|
||||
patron = r'<a\s*href="(?P<url>[^"]+)"\s*title="(?P<title>[^"]+)"\s*class="btn btn-dark mb-1">'
|
||||
patron = r'<a\s*href="(?P<url>[^"]+)"\s*title="(?P<title>[^"]+)"\s*class="btn btn-dark mb-1">(?P<episode>\d+)'
|
||||
def itemHook(item):
|
||||
support.info(item)
|
||||
if item.url.startswith('//'): item.url= 'https:' + item.url
|
||||
@@ -126,30 +126,37 @@ def episodios(item):
|
||||
def findvideos(item):
|
||||
support.info(item)
|
||||
itemlist = []
|
||||
|
||||
if 'adf.ly' in item.url:
|
||||
from servers.decrypters import adfly
|
||||
url = adfly.get_long_url(item.url)
|
||||
|
||||
elif 'bit.ly' in item.url:
|
||||
url = support.httptools.downloadpage(item.url, only_headers=True, follow_redirects=False).headers.get("location")
|
||||
|
||||
if item.data:
|
||||
url = support.match(item.data, patron=r'<a\s*href="([^"]+)"\s*title="[^"]+"\s*class="btn btn-dark mb-1">').match
|
||||
else:
|
||||
url = host
|
||||
for u in item.url.split('/'):
|
||||
if u and 'animeforce' not in u and 'http' not in u:
|
||||
url += '/' + u
|
||||
url = item.url
|
||||
|
||||
if 'php?' in url:
|
||||
url = support.httptools.downloadpage(url, only_headers=True, follow_redirects=False).headers.get("location")
|
||||
url = support.match(url, patron=r'class="button"><a href=(?:")?([^" ]+)', headers=headers).match
|
||||
else:
|
||||
if item.data: url = item.data
|
||||
url = support.match(url, patron=r'data-href="([^"]+)" target').match
|
||||
if not url: url = support.match(url, patron=[r'<source src=(?:")?([^" ]+)',r'name="_wp_http_referer" value="([^"]+)"']).match
|
||||
if url.startswith('//'): url = 'https:' + url
|
||||
elif url.startswith('/'): url = 'https:/' + url
|
||||
if 'vvvvid' in url: itemlist.append(item.clone(action="play", title='VVVVID', url=url, server='vvvvid'))
|
||||
else: itemlist.append(item.clone(action="play", title=support.config.get_localized_string(30137), url=url, server='directo'))
|
||||
# if 'adf.ly' in item.url:
|
||||
# from servers.decrypters import adfly
|
||||
# url = adfly.get_long_url(item.url)
|
||||
|
||||
# elif 'bit.ly' in item.url:
|
||||
# url = support.httptools.downloadpage(item.url, only_headers=True, follow_redirects=False).headers.get("location")
|
||||
|
||||
# else:
|
||||
# url = host
|
||||
# for u in item.url.split('/'):
|
||||
# if u and 'animeforce' not in u and 'http' not in u:
|
||||
# url += '/' + u
|
||||
|
||||
|
||||
# if 'php?' in url:
|
||||
# url = support.httptools.downloadpage(url, only_headers=True, follow_redirects=False).headers.get("location")
|
||||
# url = support.match(url, patron=r'class="button"><a href=(?:")?([^" ]+)', headers=headers).match
|
||||
# else:
|
||||
# if item.data: url = item.data
|
||||
# if item.contentType == 'movie': url = support.match()
|
||||
# url = support.match(url, patron=r'data-href="([^"]+)" target').match
|
||||
# if not url: url = support.match(url, patron=[r'<source src=(?:")?([^" ]+)',r'name="_wp_http_referer" value="([^"]+)"']).match
|
||||
# if url.startswith('//'): url = 'https:' + url
|
||||
# elif url.startswith('/'): url = 'https:/' + url
|
||||
url = support.match(url, patron=r'data-href="([^"]+)" target').match
|
||||
if 'vvvvid' in url: itemlist.append(item.clone(action="play", title='VVVVID', url=url, server='vvvvid'))
|
||||
else: itemlist.append(item.clone(action="play", title=support.config.get_localized_string(30137), url=url, server='directo'))
|
||||
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"id": "animeleggendari",
|
||||
"name": "AnimePerTutti",
|
||||
"active": false,
|
||||
"language": ["ita", "sub-ita"],
|
||||
"thumbnail": "animepertutti.png",
|
||||
"bannermenu": "animepertutti.png",
|
||||
"categories": ["anime", "vos"],
|
||||
"not_active":["include_in_newest_peliculas", "include_in_newest_series", "include_in_newest_anime"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -1,141 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per animeleggendari
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
from lib.js2py.host import jsfunctions
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
|
||||
headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
|
||||
['Referer', host]]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
anime = [
|
||||
# ('Leggendari', ['/category/anime-leggendari/', 'peliculas']),
|
||||
('ITA', ['/category/anime-ita/', 'peliculas']),
|
||||
('SUB-ITA', ['/category/anime-sub-ita/', 'peliculas']),
|
||||
('Conclusi', ['/category/serie-anime-concluse/', 'peliculas']),
|
||||
('in Corso', ['/category/serie-anime-in-corso/', 'peliculas']),
|
||||
('Genere', ['', 'genres'])
|
||||
]
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.info(texto)
|
||||
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
blacklist = ['Contattaci','Privacy Policy', 'DMCA']
|
||||
patronMenu = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)<'
|
||||
patronBlock = r'Generi</a>\s*<ul[^>]+>(?P<block>.*?)<\/ul>'
|
||||
action = 'peliculas'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
anime = True
|
||||
blacklist = ['top 10 anime da vedere']
|
||||
if item.url != host: patronBlock = r'<div id="main-content(?P<block>.*?)<aside'
|
||||
patron = r'<figure class="(?:mh-carousel-thumb|mh-posts-grid-thumb)">\s*<a (?:class="[^"]+" )?href="(?P<url>[^"]+)" title="(?P<title>.*?)(?: \((?P<year>\d+)\))? (?:(?P<lang>SUB ITA|ITA))(?: (?P<title2>[Mm][Oo][Vv][Ii][Ee]))?[^"]*"><img (?:class="[^"]+"|width="[^"]+" height="[^"]+") src="(?P<thumb>[^"]+)"[^>]+'
|
||||
def itemHook(item):
|
||||
if 'movie' in item.title.lower():
|
||||
item.title = support.re.sub(' - [Mm][Oo][Vv][Ii][Ee]|[Mm][Oo][Vv][Ii][Ee]','',item.title)
|
||||
item.title += support.typo('Movie','_ () bold')
|
||||
item.contentType = 'movie'
|
||||
item.action = 'findvideos'
|
||||
return item
|
||||
def itemlistHook(itemlist):
|
||||
itlist = []
|
||||
for item in itemlist:
|
||||
if 'nuovo episodio:' not in item.title.lower():
|
||||
itlist += [item]
|
||||
return itlist
|
||||
|
||||
patronNext = r'<a class="next page-numbers" href="([^"]+)">'
|
||||
action = 'episodios'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
data = support.match(item, headers=headers, patronBlock=r'entry-content clearfix">(.*?)class="mh-widget mh-posts-2 widget_text').block
|
||||
if not 'pagination clearfix' in data:
|
||||
support.info('NOT IN DATA')
|
||||
patron = r'<iframe.*?src="(?P<url>[^"]+)"'
|
||||
title = item.title
|
||||
def fullItemlistHook(itemlist):
|
||||
if len(itemlist) > 0:
|
||||
urls = []
|
||||
for item in itemlist:
|
||||
urls.append(item.url)
|
||||
item = itemlist[0]
|
||||
item.data = urls
|
||||
item.title = title
|
||||
item.contentType = 'movie'
|
||||
itemlist = []
|
||||
itemlist.append(item)
|
||||
return itemlist
|
||||
else:
|
||||
url = item.url
|
||||
anime = True
|
||||
patronBlock = r'(?:<p style="text-align: left;">|<div class="pagination clearfix">\s*)(?P<block>.*?)</span></a></div>'
|
||||
patron = r'(?:<a href="(?P<url>[^"]+)"[^>]+>)?<span class="pagelink">(?P<episode>\d+)'
|
||||
def itemHook(item):
|
||||
if not item.url:
|
||||
item.url = url
|
||||
if 'Movie Parte' in data:
|
||||
item.title = support.typo(item.fulltitle + ' - Part ','bold') + item.title
|
||||
item.contentType = 'movie'
|
||||
else:
|
||||
item.title = support.typo('Episodio ', 'bold') + item.title
|
||||
return item
|
||||
return locals()
|
||||
|
||||
def check(item):
|
||||
data = support.match(item, headers=headers).data
|
||||
if 'Lista Episodi' not in data:
|
||||
item.data = data
|
||||
return findvideos(item)
|
||||
|
||||
data = ''
|
||||
return data
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
if item.data:
|
||||
data = item.data
|
||||
else:
|
||||
matches = support.match(item, patron=r'<iframe.*?src="(?P<url>[^"]+)"').matches
|
||||
data = ''
|
||||
if matches:
|
||||
for match in matches:
|
||||
try: data += str(jsfunctions.unescape(support.re.sub('@|g','%', match)))
|
||||
except: data += ''
|
||||
data += str(match)
|
||||
else:
|
||||
data = ''
|
||||
|
||||
return support.server(item,data)
|
||||
+6
-43
@@ -6,6 +6,7 @@
|
||||
from lib import js2py
|
||||
from core import support
|
||||
from platformcode import config
|
||||
from platformcode.logger import debug
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
__channel__ = 'animesaturn'
|
||||
@@ -170,7 +171,7 @@ def check(item):
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
if item.contentType != 'movie': anime = True
|
||||
patron = r'episodi-link-button">\s*<a href="(?P<url>[^"]+)"[^>]+>\s*(?P<title>[^<]+)</a>'
|
||||
patron = r'episodi-link-button">\s*<a href="(?P<url>[^"]+)"[^>]+>\s*(?P<title>[^\d<]+(?P<episode>\d+))\s*</a>'
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -178,46 +179,11 @@ def findvideos(item):
|
||||
support.info()
|
||||
itemlist = []
|
||||
links = []
|
||||
# page_data = ''
|
||||
# titles =['Primario', 'Secondario', 'Alternativo Primario', 'Alternativo Secondario']
|
||||
# pre_data = support.match(item, headers=headers).data
|
||||
# url = support.match(pre_data , patron=r'<a href="([^"]+)">[^>]+>[^>]+>G').match
|
||||
# urls = [url, url+'&extra=1', url+'&s=alt', url+'&s=alt&extra=1']
|
||||
# links = []
|
||||
# support.dbg()
|
||||
# for i, url in enumerate(urls):
|
||||
# data = support.match(url, headers=headers).data
|
||||
# if not '&s' in url:
|
||||
# link = support.match(data, patron=r'(?:<source type="[^"]+"\s*src=|file:\s*)"([^"]+)"', headers=headers).match
|
||||
# else:
|
||||
# link = support.match(data, headers=headers, patron=r'file:\s*"([^"]+)"').match
|
||||
# if not link:
|
||||
# page_data += data
|
||||
# if link and link not in links:
|
||||
# links.append(link)
|
||||
# # link += '|Referer=' + item.url
|
||||
# itemlist.append(item.clone(action="play", title=titles[i], url=link, server='directo'))
|
||||
|
||||
# return support.server(item, data=data, itemlist=itemlist)
|
||||
main_url = support.match(item, patron=r'<a href="([^"]+)">[^>]+>[^>]+>G').match
|
||||
# internal = support.match(data, patron=r'<a href="([^"]+)">[^>]+>[^>]+>G').match
|
||||
urls = support.match(support.match(main_url, headers=headers).data, patron=r'<a class="dropdown-item"\s*href="([^"]+)', headers=headers).matches
|
||||
itemlist.append(item.clone(action="play", title='Primario', url=main_url, server='directo'))
|
||||
itemlist.append(item.clone(action="play", title='Secondario', url=main_url + '&s=alt', server='directo'))
|
||||
# support.dbg()
|
||||
# for i, url in enumerate(internal_urls):
|
||||
# internal_data = support.match(url, headers=headers).data
|
||||
# if not '&s' in url:
|
||||
# link = support.match(internal_data, patron=r'(?:<source type="[^"]+"\s*src=|file:\s*)"([^"]+)"', headers=headers).match
|
||||
# else:
|
||||
# link = support.match(internal_data, headers=headers, patron=r'file:\s*"([^"]+)"').match
|
||||
# if not link:
|
||||
# links.append(internal_data)
|
||||
# if link and link not in links:
|
||||
# links.append(link)
|
||||
# itemlist.append(item.clone(action="play", title=internal_titles[i], url=link, server='directo'))
|
||||
# link = support.match(external[0], patron=r'href="([^"]+)', headers=headers, debug=True).match
|
||||
# support.dbg()
|
||||
for url in urls:
|
||||
link = support.match(url, patron=r'<a href="([^"]+)"[^>]+><button', headers=headers).match
|
||||
if link:
|
||||
@@ -225,10 +191,7 @@ def findvideos(item):
|
||||
return support.server(item, data=links, itemlist=itemlist)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def play(item):
|
||||
if item.server == 'directo':
|
||||
item.url = support.match(item.url, patron=r'(?:source type="[^"]+"\s*src=|file:[^"]+)"([^"]+)').match
|
||||
return[item]
|
||||
|
||||
+12
-74
@@ -4,11 +4,8 @@
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import cloudscraper, json, copy, inspect
|
||||
from core import jsontools, support, httptools, filetools
|
||||
from core import support
|
||||
from platformcode import autorenumber, logger
|
||||
import re
|
||||
import xbmc
|
||||
|
||||
|
||||
session = cloudscraper.create_scraper()
|
||||
|
||||
@@ -132,7 +129,8 @@ def news(item):
|
||||
fulltitle=it['anime']['title'],
|
||||
thumbnail=it['anime']['imageurl'],
|
||||
forcethumb = True,
|
||||
video_url=it['scws_id'],
|
||||
scws_id=it.get('scws_id', ''),
|
||||
video_url=it.get('link', ''),
|
||||
plot=it['anime']['plot'],
|
||||
action='findvideos')
|
||||
)
|
||||
@@ -157,7 +155,6 @@ def peliculas(item):
|
||||
records = session.post(host + '/archivio/get-animes', headers=headers, data=payload).json()['records']
|
||||
|
||||
for it in records:
|
||||
logger.debug(jsontools.dump(it))
|
||||
lang = support.match(it['title'], patron=r'\(([It][Tt][Aa])\)').match
|
||||
title = support.re.sub(r'\s*\([^\)]+\)', '', it['title'])
|
||||
|
||||
@@ -176,15 +173,15 @@ def peliculas(item):
|
||||
itm.fulltitle = itm.show = itm.contentTitle = title
|
||||
itm.contentSerieName = ''
|
||||
itm.action = 'findvideos'
|
||||
itm.video_url = it['episodes'][0]['scws_id']
|
||||
itm.scws_id = it['episodes'][0].get('scws_id', '')
|
||||
itm.video_url = it['episodes'][0].get('link', '')
|
||||
|
||||
else:
|
||||
itm.contentType = 'tvshow'
|
||||
itm.contentTitle = ''
|
||||
itm.fulltitle = itm.show = itm.contentSerieName = title
|
||||
itm.action = 'episodios'
|
||||
itm.episodes = it['episodes'] if 'episodes' in it else it['scws_id']
|
||||
itm.video_url = item.url
|
||||
itm.episodes = it['episodes'] if 'episodes' in it else it.get('scws_id', '')
|
||||
|
||||
itemlist.append(itm)
|
||||
|
||||
@@ -198,6 +195,7 @@ def episodios(item):
|
||||
support.info()
|
||||
itemlist = []
|
||||
title = 'Parte ' if item.type.lower() == 'movie' else 'Episodio '
|
||||
|
||||
for it in item.episodes:
|
||||
itemlist.append(
|
||||
item.clone(title=support.typo(title + it['number'], 'bold'),
|
||||
@@ -210,9 +208,10 @@ def episodios(item):
|
||||
plot=item.plot,
|
||||
action='findvideos',
|
||||
contentType='episode',
|
||||
video_url=it['scws_id']))
|
||||
scws_id=it.get('scws_id', ''),
|
||||
video_url=it.get('link', '')))
|
||||
|
||||
if inspect.stack()[1][3] not in ['find_episodes']:
|
||||
if inspect.stack(0)[1][3] not in ['find_episodes']:
|
||||
autorenumber.start(itemlist, item)
|
||||
support.videolibrary(itemlist, item)
|
||||
support.download(itemlist, item)
|
||||
@@ -220,67 +219,6 @@ def episodios(item):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
# def calculateToken():
|
||||
# from time import time
|
||||
# from base64 import b64encode as b64
|
||||
# import hashlib
|
||||
# o = 48
|
||||
# n = support.match('https://au-1.scws-content.net/get-ip').data
|
||||
# i = 'Yc8U6r8KjAKAepEA'
|
||||
# t = int(time() + (3600 * o))
|
||||
# l = '{}{} {}'.format(t, n, i)
|
||||
# md5 = hashlib.md5(l.encode())
|
||||
# s = '?token={}&expires={}'.format(b64(md5.digest()).decode().replace('=', '').replace('+', "-").replace('\\', "_"), t)
|
||||
# return s
|
||||
# token = calculateToken()
|
||||
|
||||
# url = 'https://streamingcommunityws.com/master/{}{}'.format(item.video_url, token)
|
||||
|
||||
# # support.dbg()
|
||||
|
||||
# m3u8_original = httptools.downloadpage(url, CF=False).data
|
||||
|
||||
# m_video = re.search(r'\.\/video\/(\d+p)\/playlist.m3u8', m3u8_original)
|
||||
# video_res = m_video.group(1)
|
||||
# m_audio = re.search(r'\.\/audio\/(\d+k)\/playlist.m3u8', m3u8_original)
|
||||
# audio_res = m_audio.group(1)
|
||||
|
||||
# # https://streamingcommunityws.com/master/5957?type=video&rendition=480p&token=wQLowWskEnbLfOfXXWWPGA&expires=1623437317
|
||||
# video_url = 'https://streamingcommunityws.com/master/{}{}&type=video&rendition={}'.format(item.video_url, token, video_res)
|
||||
# audio_url = 'https://streamingcommunityws.com/master/{}{}&type=audio&rendition={}'.format(item.video_url, token, audio_res)
|
||||
|
||||
# m3u8_original = m3u8_original.replace( m_video.group(0), video_url )
|
||||
# m3u8_original = m3u8_original.replace( m_audio.group(0), audio_url )
|
||||
|
||||
# file_path = 'special://temp/animeunity.m3u8'
|
||||
|
||||
# filetools.write(xbmc.translatePath(file_path), m3u8_original, 'w')
|
||||
|
||||
# return support.server(item, itemlist=[item.clone(title=support.config.get_localized_string(30137), url=file_path, manifest = 'hls', server='directo', action='play')])
|
||||
# item.url=item.video_url
|
||||
|
||||
directLink = False
|
||||
if item.video_url == None:
|
||||
if item.extra == "tvshow":
|
||||
epnum = item.episode
|
||||
logger.info('it is a episode', epnum)
|
||||
episode = None
|
||||
for ep in item.episodes:
|
||||
if ep["number"] == epnum:
|
||||
episode = ep
|
||||
break
|
||||
if episode == None:
|
||||
logger.warn('cannot found episode')
|
||||
else:
|
||||
item.url = episode["link"]
|
||||
directLink = True
|
||||
|
||||
if directLink:
|
||||
logger.info('try direct link')
|
||||
return support.server(item, itemlist=[item.clone(title=support.config.get_localized_string(30137), url=item.url, server='directo', action='play')])
|
||||
else:
|
||||
return support.server(item, itemlist=[item.clone(title="StreamingCommunityWS", url=str(item.video_url), manifest = 'hls', server='streamingcommunityws', action='play')])
|
||||
|
||||
|
||||
|
||||
itemlist = [item.clone(title=support.config.get_localized_string(30137), server='streamingcommunityws', url=str(item.scws_id))]
|
||||
return support.server(item, itemlist=itemlist, referer=False)
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ def peliculas(item):
|
||||
|
||||
if item.args == 'updated':
|
||||
item.contentType='episode'
|
||||
patron=r'<div class="inner">\s*<a href="(?P<url>[^"]+)" class[^>]+>\s*<img.*?src="(?P<thumb>[^"]+)" alt?="(?P<title>[^\("]+)(?:\((?P<lang>[^\)]+)\))?"[^>]+>[^>]+>\s*(?:<div class="[^"]+">(?P<type>[^<]+)</div>)?[^>]+>[^>]+>\s*<div class="ep">[^\d]+(?P<episode>\d+)[^<]*</div>'
|
||||
patron=r'<div class="inner">\s*<a href="(?P<url>[^"]+)" class[^>]+>\s*<img.*?src="(?P<thumb>[^"]+)" alt?="(?P<title>[^\("]+)(?:\((?P<lang>[^\)]+)\))?"[^>]+>[^>]+>\s*(?:<div class="[^"]+">(?P<type>[^<]+)</div>)?(?:[^>]+>){2,4}\s*<div class="ep">[^\d]+(?P<episode>\d+)[^<]*</div>'
|
||||
action='findvideos'
|
||||
else:
|
||||
patron= r'<div class="inner">\s*<a href="(?P<url>[^"]+)" class[^>]+>\s*<img.*?src="(?P<thumb>[^"]+)" alt?="(?P<title>[^\("]+)(?:\((?P<year>\d+)\) )?(?:\((?P<lang>[^\)]+)\))?(?P<title2>[^"]+)?[^>]+>[^>]+>(?:\s*<div class="(?P<l>[^"]+)">[^>]+>)?\s*(?:<div class="[^"]+">(?P<type>[^<]+)</div>)?'
|
||||
|
||||
+4
-3
@@ -128,7 +128,7 @@ def latest_added(item):
|
||||
js = httptools.downloadpage(url).json
|
||||
|
||||
for episode in js:
|
||||
title = episode['title']
|
||||
title = episode['title'] if episode['title'] else ''
|
||||
animeTitle, lang = get_lang(episode['animeTitle'])
|
||||
quality = 'Full HD' if episode['fullHd'] else 'HD'
|
||||
long_title = support.typo('{}. {}{}'.format(int(float(episode['episodeNumber'])), title + ' - ' if title else '', animeTitle), 'bold') + support.typo(lang, '_ [] color kod') + support.typo(quality, '_ [] color kod')
|
||||
@@ -176,7 +176,7 @@ def peliculas(item):
|
||||
contentSerieName = title if it['type'] == 'Serie' else '',
|
||||
action ='findvideos' if it['type'] == 'Movie' else 'episodios',# '' if not active else 'findvideos' if it['type'] == 'Movie' else 'episodios',
|
||||
plot = it['storyline'],
|
||||
year = it['startDate'].split('-')[0],
|
||||
# year = it['startDate'].split('-')[0],
|
||||
url = '{}/api/anime/{}'.format(host, it['id']),
|
||||
thumbnail = get_thumbnail(it),
|
||||
fanart = get_thumbnail(it, 'horizontalImages')))
|
||||
@@ -289,8 +289,9 @@ def findvideos(item):
|
||||
|
||||
if json.get('episodes', []):
|
||||
json = httptools.downloadpage('{}/api/episode/{}'.format(host, json['episodes'][0]['id'])).json
|
||||
# logger.debug(json)
|
||||
|
||||
videourl = json['episodeVideo']
|
||||
videourl = json['videoUrl']
|
||||
|
||||
itemlist = [item.clone(title=config.get_localized_string(30137),
|
||||
url=videourl,
|
||||
|
||||
@@ -14,7 +14,6 @@ headers = [['Referer', host]]
|
||||
def mainlist(item):
|
||||
film = ['/category/film',
|
||||
('Generi', ['', 'genres', 'genres']),
|
||||
('Sub-ITA', ['/category/sub-ita/', 'peliculas', 'sub'])
|
||||
]
|
||||
|
||||
tvshow = ['/category/serie-tv',
|
||||
@@ -35,7 +34,7 @@ def genres(item):
|
||||
return locals()
|
||||
|
||||
|
||||
def select(item):
|
||||
def check(item):
|
||||
item.data = support.match(item).data
|
||||
if 'continua con il video' in item.data.lower():
|
||||
support.info('select = ### è un film ###')
|
||||
@@ -101,7 +100,7 @@ def peliculas(item):
|
||||
action = 'episodios'
|
||||
pagination = ''
|
||||
else:
|
||||
action = 'select'
|
||||
action = 'check'
|
||||
|
||||
if item.args == 'newest':
|
||||
patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s*?<div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>[sS]ub-[iI][tT][aA])?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?<(?:[^>]+>.+?(?:title="Nuovi episodi">(?P<episode>\d+x\d+)[ ]?(?P<lang2>Sub-Ita)?|title="IMDb">(?P<rating>[^<]+)))?'
|
||||
@@ -134,8 +133,11 @@ def episodios(item):
|
||||
action = 'findvideos'
|
||||
item.contentType = 'tvshow'
|
||||
blacklist = ['']
|
||||
patron = r'(?P<episode>\d+(?:×|×)?\d+\-\d+|\d+(?:×|×)\d+)[;]?(?:(?P<title>[^<]+)<(?P<data>.*?)|(\2[ ])(?:<(\3.*?)))(?:<br />|</p>)'
|
||||
patronBlock = r'<strong>(?P<block>(?:.+?Stagione*.+?(?P<lang>[Ii][Tt][Aa]|[Ss][Uu][Bb][\-]?[iI][tT][aA]))?(?:.+?|</strong>)(/?:</span>)?</p>.*?</p>)'
|
||||
# debug = True
|
||||
patron = r'"season-no">(?P<season>\d+)x(?P<episode>\d+)(?:[^>]+>){5}\s*(?P<title>[^<]+)(?P<data>.*?)</table>'
|
||||
# patron = r'(?P<episode>\d+(?:×|×)?\d+\-\d+|\d+(?:×|×)\d+)[;]?(?:(?P<title>[^<]+)<(?P<data>.*?)|(\2[ ])(?:<(\3.*?)))(?:<br />|</p>)'
|
||||
patronBlock = r'<span>(?:.+?Stagione*.+?(?P<lang>[Ii][Tt][Aa]|[Ss][Uu][Bb][\-]?[iI][tT][aA]))?.*?</span>.*?class="content(?P<block>.*?)(?:"accordion-item|<script>)'
|
||||
# patronBlock = r'<strong>(?P<block>(?:.+?Stagione*.+?(?P<lang>[Ii][Tt][Aa]|[Ss][Uu][Bb][\-]?[iI][tT][aA]))?(?:.+?|</strong>)(/?:</span>)?</p>.*?</p>)'
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -146,9 +148,7 @@ def findvideos(item):
|
||||
matchData = item.data if item.data else item
|
||||
links = support.match(matchData, patron=r'(?:SRC|href)="([^"]+)"', patronBlock=r'<div class="col-md-10">(.+?)<div class="ads">').matches
|
||||
data = ''
|
||||
from lib.unshortenit import unshorten_only
|
||||
for link in links:
|
||||
support.info('URL=',link)
|
||||
url, c = unshorten_only(link.replace('#', 'speedvideo.net'))
|
||||
data += url + '\n'
|
||||
data += link + '\n'
|
||||
return support.server(item, data)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"id": "cb01anime",
|
||||
"name": "Cb01anime",
|
||||
"language": ["ita", "vos", "sub-ita"],
|
||||
"active": true,
|
||||
"thumbnail": "cb01anime.png",
|
||||
"banner": "cb01anime.png",
|
||||
"categories": ["anime"],
|
||||
"settings": []
|
||||
}
|
||||
"id": "cb01anime",
|
||||
"name": "Cb01anime",
|
||||
"language": ["ita", "vos", "sub-ita"],
|
||||
"active": false,
|
||||
"thumbnail": "cb01anime.png",
|
||||
"banner": "cb01anime.png",
|
||||
"categories": ["anime"],
|
||||
"settings": []
|
||||
}
|
||||
+24
-27
@@ -9,14 +9,14 @@ from core import scrapertools, httptools, servertools, support
|
||||
from platformcode import logger, config
|
||||
|
||||
|
||||
# def findhost(url):
|
||||
# host = httptools.downloadpage(url, follow_redirect=True).url
|
||||
# if host == 'https://cb01.uno/':
|
||||
# host = support.match(host, patron=r'<a href="([^"]+)').match
|
||||
# return host
|
||||
def findhost(url):
|
||||
host = httptools.downloadpage(url, follow_redirect=True).url
|
||||
if host == 'https://cb01.uno/':
|
||||
host = support.match(host, patron=r'<a href="([^"]+)').match
|
||||
return host
|
||||
|
||||
|
||||
host = config.get_channel_url()
|
||||
host = config.get_channel_url(findhost)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
@@ -45,8 +45,9 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
# debug=True
|
||||
patronBlock = item.args + r'<span.*?><\/span>.*?<ul.*?>(?P<block>.*?)<\/ul>'
|
||||
patronMenu = r'href="?(?P<url>[^">]+)"?>(?P<title>.*?)<\/a>'
|
||||
patronMenu = r'href="?(?P<url>[^">]+)"?>(?P<title>[^<»]+)'
|
||||
action = 'peliculas'
|
||||
|
||||
return locals()
|
||||
@@ -104,14 +105,14 @@ def peliculas(item):
|
||||
pagination = ''
|
||||
patronBlock = r'sequex-page-left(?P<block>.*?)sequex-page-right'
|
||||
if '/serietv/' not in item.url:
|
||||
patron = r'src="?(?P<thumb>[^ "]+)"? alt="?(?P<title>.*?)(?:\[(?P<quality>[a-zA-Z/]+)\]\s*)?(?:\[(?P<lang>Sub-ITA|ITA)\]\s*)?(?:\[(?P<quality2>[a-zA-Z/]+)\]\s*)?\((?P<year>\d{4})[^\)]*\)[^>]*>.*?<a href=(?:")?(?P<url>[^" ]+)(?:")?.*?rpwe-summary[^>]*>(?P<genre>\w+) [^ ]+ DURATA (?P<duration>[0-9]+)[^ ]+ [^ ]+ [A-Z ]+ (?P<plot>[^<]+)<'
|
||||
patron = r'src="?(?P<thumb>[^ "]+)"? alt="?(?P<title>.*?)(?:\[(?P<quality>[a-zA-Z]+(?:[/]?3D)?)\]\s*)?(?:\[(?P<lang>Sub-ITA|ITA)\]\s*)?(?:\[(?P<quality2>[a-zA-Z]+(?:[/]?3D)?)\]\s*)?\((?P<year>\d{4})[^\)]*\)[^>]*>.*?<a href=(?:")?(?P<url>[^" ]+)(?:")?.*?rpwe-summary[^>]*>(?P<genre>\w+) [^ ]+ DURATA (?P<duration>[0-9]+)[^ ]+ [^ ]+ [A-Z ]+ (?P<plot>[^<]+)<'
|
||||
action = 'findvideos'
|
||||
else:
|
||||
patron = r'src=(?:")?(?P<thumb>[^ "]+)(?:")? alt=(?:")?(?P<title>.*?)(?: – \d+×\d+)?(?:>|"| – )(?:(?P<lang>Sub-ITA|ITA))?[^>]*>.*?<a href=(?:")?(?P<url>[^" ]+)(?:")?.*?rpwe-summary[^>]*>(?P<genre>[^\(]*)\((?P<year>\d{4})[^\)]*\) (?P<plot>[^<]+)<'
|
||||
action = 'episodios'
|
||||
|
||||
elif '/serietv/' not in item.url:
|
||||
patron = r'(?<!sticky )hentry.*?<div class="card-image">\s*<a[^>]+>\s*<img src="(?P<thumb>[^" ]+)" alt[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="?(?P<url>[^" >]+)(?:\/|"|\s+)>(?P<title>[^<[(]+)(?:\[(?P<quality>[a-zA-Z/]+)\]\s*)?(?:\[(?P<lang>Sub-ITA|ITA)\]\s*)?(?:\[(?P<quality2>[a-zA-Z/]+)\]\s*)? (?:\((?P<year>[0-9]{4})\))?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<genre>[^<>&âÃÂÖ]+)(?:[^ ]+\s*DURATA\s*(?P<duration>[0-9]+)[^>]+>[^>]+>[^>]+>(?P<plot>[^<>]+))?'
|
||||
patron = r'(?<!sticky )hentry.*?<div class="card-image">\s*<a[^>]+>\s*<img src="(?P<thumb>[^" ]+)" alt[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="?(?P<url>[^" >]+)(?:\/|"|\s+)>(?P<title>[^<[(]+)(?:\[(?P<quality>[a-zA-Z]+(?:[/]?3D)?)\]\s*)?(?:\[(?P<lang>Sub-ITA|ITA)\]\s*)?(?:\[(?P<quality2>[a-zA-Z/]+)\]\s*)? (?:\((?P<year>[0-9]{4})\))?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<genre>[^<>&âÃÂÖ]+)(?:[^ ]+\s*DURATA\s*(?P<duration>[0-9]+)[^>]+>[^>]+>[^>]+>(?P<plot>[^<>]+))?'
|
||||
action = 'findvideos'
|
||||
|
||||
else:
|
||||
@@ -133,28 +134,28 @@ def peliculas(item):
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
@support.scrape
|
||||
def folder(item, data):
|
||||
def folder(item, url):
|
||||
"""
|
||||
Quando c'è un link ad una cartella contenente più stagioni
|
||||
"""
|
||||
actLike = 'episodios'
|
||||
addVideolibrary = False
|
||||
downloadEnabled = False
|
||||
if url:
|
||||
data = support.match(url).data
|
||||
actLike = 'episodios'
|
||||
addVideolibrary = False
|
||||
downloadEnabled = False
|
||||
|
||||
folderUrl = scrapertools.find_single_match(data, r'TUTTA L[EA] \w+\s+(?:–|-)\s+<a href="?([^" ]+)')
|
||||
data = httptools.downloadpage(folderUrl, disable_directIP=True).data
|
||||
patron = r'<td>(?P<title>[^<]+)<td><a [^>]+href="(?P<url>[^"]+)[^>]+>'
|
||||
sceneTitle = True
|
||||
# debug = True
|
||||
patron = r'<td>(?P<title>[^<]+)<td><a [^>]+href="(?P<url>[^"]+)[^>]+>'
|
||||
sceneTitle = True
|
||||
# debug = True
|
||||
|
||||
def itemHook(item):
|
||||
item.serieFolder = True
|
||||
return item
|
||||
def itemHook(item):
|
||||
item.serieFolder = True
|
||||
return item
|
||||
return locals()
|
||||
|
||||
# debugBlock=True
|
||||
data = support.match(item.url, headers=headers).data
|
||||
folderItemlist = folder(item, data) if '<p>TUTTA L' in data else []
|
||||
folderItemlist = folder(item, scrapertools.find_single_match(data, r'TUTT[EA] L[EA] \w+\s+(?:–|-)\s+<a href="?([^" ]+)'))
|
||||
|
||||
patronBlock = r'(?P<block>sp-head[^>]+>\s*(?:STAGION[EI]\s*(?:(?:DA)?\s*[0-9]+\s*A)?\s*[0-9]+|MINISSERIE)(?::\s*PARTE\s*[0-9]+)? - (?P<lang>[^-<]+)(?:- (?P<quality>[^-<]+))?.*?<\/div>.*?)spdiv[^>]*>'
|
||||
patron = r'(?:/>|<p>|<strong>)(?P<other>.*?(?P<episode>[0-9]+(?:×|ÃÂ)[0-9]+)\s*(?P<title2>.*?)?(?:\s*–|\s*-|\s*<).*?)(?:<\/p>|<br)'
|
||||
@@ -194,7 +195,6 @@ def findvideos(item):
|
||||
|
||||
def load_links(itemlist, re_txt, desc_txt, quality=""):
|
||||
streaming = scrapertools.find_single_match(data, re_txt).replace('"', '')
|
||||
logger.debug('STREAMING', streaming)
|
||||
logger.debug('STREAMING=', streaming)
|
||||
matches = support.match(streaming, patron = r'<td><a.*?href=([^ ]+) [^>]+>([^<]+)<').matches
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
@@ -218,12 +218,9 @@ def findvideos(item):
|
||||
# Estrae i contenuti - Streaming 3D
|
||||
load_links(itemlist, '<strong>Streamin?g 3D[^<]+</strong>(.*?)cbtable', "Streaming 3D")
|
||||
|
||||
itemlist = support.server(item, itemlist=itemlist)
|
||||
# Extract the quality format
|
||||
patronvideos = r'([\w.]+)</strong></div></td>'
|
||||
support.addQualityTag(item, itemlist, data, patronvideos)
|
||||
|
||||
return itemlist
|
||||
return support.server(item, itemlist=itemlist, patronTag=patronvideos)
|
||||
|
||||
# Estrae i contenuti - Download
|
||||
# load_links(itemlist, '<strong>Download:</strong>(.*?)<tableclass=cbtable height=30>', "aqua", "Download")
|
||||
|
||||
+132
-45
@@ -7,8 +7,15 @@ import re
|
||||
|
||||
from core import httptools, support, scrapertools
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
from core.support import typo
|
||||
from platformcode import config, logger
|
||||
import sys
|
||||
|
||||
from platformcode.logger import debug
|
||||
if sys.version_info[0] >= 3:
|
||||
from concurrent import futures
|
||||
else:
|
||||
from concurrent_py2 import futures
|
||||
|
||||
# rimanda a .today che contiene tutti link a .plus
|
||||
# def findhost(url):
|
||||
@@ -53,11 +60,13 @@ def peliculas(item):
|
||||
patron = r'<div class="col-lg-3">[^>]+>[^>]+>\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>(?P<title>[^<]+)<[^>]+>[^>]+>(?:[^>]+>)?\s?(?P<rating>[\d\.]+)?[^>]+>.+?(?:[ ]\((?P<year>\d{4})\))?<[^>]+>[^>]+>(.?[\d\-x]+\s\(?(?P<lang>[sSuUbBiItTaA\-]+)?\)?\s?(?P<quality>[\w]+)?[|]?\s?(?:[fFiInNeE]+)?\s?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?)?'
|
||||
pagination = 25
|
||||
elif item.contentType == 'movie':
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>.+?)(?:[ ]\[(?P<lang>[sSuUbB\-iItTaA]+)\])?(?:[ ]\((?P<year>\d{4})\))?"\s*alt="[^"]+"\s*class="[^"]+"(?: style="background-image: url\((?P<thumb>.+?)\)">)?\s*<div class="voto">[^>]+>[^>]+>.(?P<rating>[\d\.a-zA-Z\/]+)?[^>]+>[^>]+>[^>]+>(?:<div class="genere">(?P<quality>[^<]+)</div>)?'
|
||||
# action = 'findvideos'
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>.+?)(?:[ ]\[(?P<lang>[sSuUbB\-iItTaA]+)\])?(?:[ ]\((?P<year>\d{4})?\))?"\s*alt="[^"]+"\s*class="[^"]+"(?: style="background-image: url\((?P<thumb>.+?)\)">)?\s*<div class="voto">[^>]+>[^>]+>.(?P<rating>[\d\.a-zA-Z\/]+)?[^>]+>[^>]+>[^>]+>(?:<div class="genere">(?P<quality>[^<]+)</div>)?'
|
||||
if item.args == 'update':
|
||||
patronBlock = r'<section id="slider">(?P<block>.*?)</section>'
|
||||
patron = r'<a href="(?P<url>(?:https:\/\/.+?\/(?P<title>[^\/]+[a-zA-Z0-9\-]+)(?P<year>\d{4})))/".+?url\((?P<thumb>[^\)]+)\)">'
|
||||
patron = r'<a href="(?P<url>(?:https:\/\/.+?\/(?P<title>[^\/]+[a-zA-Z0-9\-]+)(?P<year>\d{4})?))/".+?url\((?P<thumb>[^\)]+)\)">'
|
||||
elif item.contentType == 'tvshow':
|
||||
# action = 'episodios'
|
||||
if item.args == 'update':
|
||||
patron = r'<a href="(?P<url>[^"]+)"[^<]+?url\((?P<thumb>.+?)\)">\s*?<div class="titolo">(?P<title>.+?)(?: – Serie TV)?(?:\([sSuUbBiItTaA\-]+\))?[ ]?(?P<year>\d{4})?</div>\s*?(?:<div class="genere">)?(?:[\w]+?\.?\s?[\s|S]?[\dx\-S]+?\s\(?(?P<lang>[iItTaA]+|[sSuUbBiItTaA\-]+)\)?\s?(?P<quality>[HD]+)?|.+?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?</div>)'
|
||||
pagination = 25
|
||||
@@ -87,33 +96,71 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
data=item.data
|
||||
# debug=True
|
||||
data = item.data
|
||||
|
||||
if item.args == 'anime':
|
||||
support.info("Anime :", item)
|
||||
# blacklist = ['Clipwatching', 'Verystream', 'Easybytez', 'Flix555', 'Cloudvideo']
|
||||
logger.debug("Anime :", item)
|
||||
patron = r'<a target=(?P<url>[^>]+>(?P<title>Episodio\s(?P<episode>\d+))(?::)?(?:(?P<title2>[^<]+))?.*?(?:<br|</p))'
|
||||
patronBlock = r'(?:Stagione (?P<season>\d+))?(?:</span><br />|</span></p>|strong></p>)(?P<block>.*?)(?:<div style="margin-left|<span class="txt_dow">)'
|
||||
item.contentType = 'tvshow'
|
||||
elif item.args == 'serie':
|
||||
support.info("Serie :", item)
|
||||
patron = r'(?:>| )(?P<episode>\d+(?:x|×|×)\d+)[;]?[ ]?(?:(?P<title>[^<–-]+)(?P<data>.*?)|(\2[ ])(?:<(\3.*?)))(?:</a><br /|</a></p|$)'
|
||||
patronBlock = r'>(?:[^<]+[Ss]tagione\s|[Ss]tagione [Uu]nica)(?:(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?.*?</strong>(?P<block>.+?)(?:<strong|<div class="at-below)'
|
||||
elif item.args == 'sport':
|
||||
logger.debug("Sport :", item)
|
||||
patron = r'(?:/>|<p>)\s*(?P<title>[^-]+)-(?P<data>.+?)(?:<br|</p)'
|
||||
patronBlock = r'</strong>\s*</p>(?P<block>.*?</p>)'
|
||||
item.contentType = 'tvshow'
|
||||
elif item.args == 'serie' or item.contentType == 'tvshow':
|
||||
logger.debug("Serie :", item)
|
||||
# debug=True
|
||||
patron = r'(?:/>|<p>)\s*(?:(?P<episode>\d+(?:x|×|×)\d+|Puntata \d+)(?:-(?P<episode2>\d+))?[;]?[ ]?(?P<title>[^<–-]+))?(?P<data>.*?)(?:<br|</p)'
|
||||
patronBlock = r'Stagione\s(?:[Uu]nica)?(?:(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?.*?</strong>(?P<block>.+?)(?:strong>|<div class="at-below)'
|
||||
item.contentType = 'tvshow'
|
||||
else:
|
||||
patron = r'(?P<title>\s*[0-9]{2}/[0-9]{2}/[0-9]{4})(?P<data>.*?)(?:<br|</p)'
|
||||
|
||||
def itemHook(item):
|
||||
if not scrapertools.find_single_match(item.title, r'(\d+x\d+)'):
|
||||
item.title = re.sub(r'(\d+) -', '1x\\1', item.title)
|
||||
return item
|
||||
def itemHook(it):
|
||||
if not scrapertools.find_single_match(it.title, r'(\d+x\d+)'):
|
||||
it.title = re.sub(r'(\d+) -', '1x\\1', it.title)
|
||||
return it
|
||||
|
||||
def itemlistHook(itl):
|
||||
ret = []
|
||||
if item.args == 'sport':
|
||||
return itl
|
||||
# support.dbg()
|
||||
for it in itl:
|
||||
ep = scrapertools.find_single_match(it.title, r'(\d+x\d+)')
|
||||
if not ep and 'http' in it.data: # stagione intera
|
||||
from lib import unshortenit
|
||||
data = unshortenit.findlinks(it.data)
|
||||
def get_ep(s):
|
||||
srv_mod = __import__('servers.%s' % s.server, None, None, ["servers.%s" % s.server])
|
||||
if hasattr(srv_mod, 'get_filename'):
|
||||
title = srv_mod.get_filename(s.url)
|
||||
ep = scrapertools.get_season_and_episode(title)
|
||||
if ep:
|
||||
if ep not in episodes:
|
||||
episodes[ep] = []
|
||||
episodes[ep].append(s)
|
||||
|
||||
servers = support.server(item, data, CheckLinks=False, Download=False, Videolibrary=False)
|
||||
episodes = {}
|
||||
for s in servers:
|
||||
get_ep(s)
|
||||
# ottengo l'episodio dal nome del file
|
||||
# with futures.ThreadPoolExecutor() as executor:
|
||||
# for s in servers:
|
||||
# executor.submit(get_ep, s)
|
||||
# logger.debug(it.contentLanguage)
|
||||
ret.extend([it.clone(title=typo(ep, 'bold')+typo(it.contentLanguage, '_ [] color kod bold'), contentSeason=int(ep.split('x')[0]), contentEpisodeNumber=int(ep.split('x')[1]), servers=[srv.tourl() for srv in episodes[ep]]) for ep in episodes])
|
||||
elif ep:
|
||||
ret.append(it)
|
||||
return sorted(ret, key=lambda i: i.title)
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
|
||||
action='peliculas'
|
||||
patron_block=r'<div id="bordobar" class="dropdown-menu(?P<block>.*?)</li>'
|
||||
patronMenu=r'<a class="dropdown-item" href="(?P<url>[^"]+)" title="(?P<title>[A-z]+)"'
|
||||
@@ -122,7 +169,7 @@ def genres(item):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.info(item.url,texto)
|
||||
logger.debug(item.url,texto)
|
||||
texto = texto.replace(' ', '+')
|
||||
item.url = host + "/?s=" + texto
|
||||
# item.contentType = 'tv'
|
||||
@@ -133,11 +180,12 @@ def search(item, texto):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.info("%s" % line)
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.info('newest ->', categoria)
|
||||
logger.debug('newest ->', categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
item.args = 'newest'
|
||||
@@ -151,47 +199,86 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.info('newest log: ', (line))
|
||||
logger.error('newest log: ', (line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def check(item):
|
||||
support.info()
|
||||
logger.debug()
|
||||
data = support.match(item.url, headers=headers).data
|
||||
# support.dbg()
|
||||
if data:
|
||||
ck = support.match(data, patron=r'Supportaci condividendo quest[oa] ([^:]+)').match.lower()
|
||||
ck = str(support.match(data, patronBlock=r'Genere:(.*?)</span>', patron=r'tag">([^<]+)').matches).lower()
|
||||
|
||||
if ck == 'serie tv':
|
||||
item.contentType = 'tvshow'
|
||||
item.args = 'serie'
|
||||
item.data = data
|
||||
return episodios(item)
|
||||
|
||||
elif ck == 'anime':
|
||||
item.contentType = 'tvshow'
|
||||
item.args = 'anime'
|
||||
item.data = data
|
||||
return episodios(item)
|
||||
|
||||
elif ck == 'film':
|
||||
item.contentType = 'movie'
|
||||
item.data = data
|
||||
return findvideos(item)
|
||||
|
||||
else:
|
||||
if 'serie tv' in ck or 'anime' in ck:# in ['serie tv', 'wrestling wwe', 'anime']:
|
||||
if 'anime' in ck:
|
||||
item.args = 'anime'
|
||||
elif 'sport' in ck:
|
||||
item.args = 'sport'
|
||||
else:
|
||||
item.args = 'serie'
|
||||
item.contentType = 'tvshow'
|
||||
item.data = data
|
||||
itemlist = episodios(item)
|
||||
if not itemlist:
|
||||
item.contentType = 'movie'
|
||||
item.data = data
|
||||
return findvideos(item)
|
||||
return itemlist
|
||||
else:
|
||||
item.contentType = 'movie'
|
||||
item.data = data
|
||||
# item.action = 'findvideos'
|
||||
return findvideos(item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
item.data = item.data.replace('http://rapidcrypt.net/verys/', '').replace('http://rapidcrypt.net/open/', '') #blocca la ricerca
|
||||
return support.server(item, data=item.data)
|
||||
def filter_ep(s):
|
||||
srv_mod = __import__('servers.%s' % s.server, None, None, ["servers.%s" % s.server])
|
||||
if hasattr(srv_mod, 'get_filename'):
|
||||
title = srv_mod.get_filename(s.url)
|
||||
# support.dbg()
|
||||
if scrapertools.get_season_and_episode(title) == str(item.contentSeason) + "x" + str(
|
||||
item.contentEpisodeNumber).zfill(2):
|
||||
servers.append(s)
|
||||
logger.debug()
|
||||
# support.dbg()
|
||||
if item.servers:
|
||||
return support.server(item, itemlist=[Item().fromurl(s) for s in item.servers])
|
||||
if not item.data:
|
||||
item.data = httptools.downloadpage(item.url)
|
||||
data = scrapertools.find_single_match(item.data, '<div class="at-above-post addthis_tool"(.*?)<div class="at-below-post')
|
||||
if data:
|
||||
item.data = data
|
||||
|
||||
servers = []
|
||||
if item.args == 'anime':
|
||||
if item.urls: # this is a episode
|
||||
return support.server(item, itemlist=[Item(url=support.unshortenit.FileCrypt().unshorten(u)) for u in item.urls])
|
||||
itemlist = []
|
||||
episodes = {}
|
||||
# support.dbg()
|
||||
for uri in support.unshortenit.FileCrypt().find(item.data):
|
||||
for ep in support.unshortenit.FileCrypt(uri).list_files():
|
||||
ep = ('.'.join(ep[0].split('.')[:-1]), ep[1]) # remove extension
|
||||
if not ep[0] in episodes:
|
||||
episodes[ep[0]] = []
|
||||
episodes[ep[0]].append(ep[1])
|
||||
for ep in episodes.keys():
|
||||
itemlist.append(item.clone(title=ep, urls=episodes[ep], action='findvideos', data=''))
|
||||
return itemlist
|
||||
total_servers = support.server(item, data=item.data)
|
||||
|
||||
if item.contentType == 'episode' and len(set([srv.server for srv in total_servers])) < len([srv.server for srv in total_servers]):
|
||||
# i link contengono più puntate, cerco quindi quella selezionata
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
for s in total_servers:
|
||||
if s.server:
|
||||
executor.submit(filter_ep, s)
|
||||
else:
|
||||
servers.append(s)
|
||||
return servers
|
||||
else:
|
||||
return total_servers
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
"thumbnail": "cinetecadibologna.png",
|
||||
"banner": "cinetecadibologna.png",
|
||||
"categories": ["documentary"],
|
||||
"not_active":["include_in_newest_peliculas", "include_in_newest_series", "include_in_newest_anime"],
|
||||
"not_active":["include_in_newest_peliculas", "include_in_newest_series", "include_in_newest_anime", "include_in_global_search"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
+163
-135
@@ -2,196 +2,224 @@
|
||||
# ------------------------------------------------------------
|
||||
# Canale per Rai Play
|
||||
# ------------------------------------------------------------
|
||||
import functools
|
||||
|
||||
import requests, uuid
|
||||
from core import jsontools, support, httptools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
import requests
|
||||
from core import support, jsontools
|
||||
from platformcode import logger, config
|
||||
typo = support.typo
|
||||
session = requests.Session()
|
||||
session.request = functools.partial(session.request, timeout=httptools.HTTPTOOLS_DEFAULT_DOWNLOAD_TIMEOUT)
|
||||
host = support.config.get_channel_url()
|
||||
deviceId = uuid.uuid4().hex
|
||||
|
||||
token = session.get('https://disco-api.discoveryplus.it/token?realm=dplayit').json()['data']['attributes']['token']
|
||||
|
||||
api = "https://disco-api.discoveryplus.it"
|
||||
headers = {'User-Agent': 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0',
|
||||
'Referer': host,
|
||||
'Cookie' : 'st=' + token}
|
||||
|
||||
def Dict(item):
|
||||
global pdict
|
||||
pdict = session.get(api + '/cms/routes/{}?decorators=viewingHistory&include=default'.format(item.args), headers=headers).json()['included']
|
||||
|
||||
# domain = 'https://eu1-prod-direct.discoveryplus.com'
|
||||
domain = 'https://' + session.get("https://prod-realmservice.mercury.dnitv.com/realm-config/www.discoveryplus.com%2Fit%2Fepg").json()["domain"]
|
||||
token = session.get('{}/token?deviceId={}&realm=dplay&shortlived=true'.format(domain, deviceId)).json()['data']['attributes']['token']
|
||||
session.headers = {'User-Agent': 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0',
|
||||
'Referer': host,
|
||||
'Origin': host,
|
||||
'Cookie': 'st={}'.format(token),
|
||||
'content-type': 'application/json',
|
||||
'x-disco-params': 'realm=dplay,siteLookupKey=dplus_it'}
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
top = [('Dirette {bold}', ['', 'live']),
|
||||
('Programmi {bullet bold tv}', ['', 'peliculas', 'programmi']),
|
||||
('Generi {bullet bold tv}', ['', 'genres'])]
|
||||
('Programmi {bullet bold tv}', ['', 'programs', 'programmi'])]
|
||||
|
||||
search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def liveDict():
|
||||
livedict = {}
|
||||
|
||||
for key in session.get(api + '/cms/routes/canali?decorators=viewingHistory&include=default', headers=headers).json()['included']:
|
||||
|
||||
if key['type'] == 'channel' and key.get('attributes',{}).get('hasLiveStream', '') and 'Free' in key.get('attributes',{}).get('packages', []):
|
||||
title = key['attributes']['name']
|
||||
livedict[title] = {}
|
||||
livedict[title]['plot'] = key['attributes']['description']
|
||||
livedict[title]['url'] = '{}/canali/{}'.format(host, key['attributes']['alternateId'])
|
||||
livedict[title]['id'] = key['id']
|
||||
return livedict
|
||||
|
||||
|
||||
def search(item, text):
|
||||
itemlist = []
|
||||
item.args = 'search'
|
||||
|
||||
item.text = text
|
||||
|
||||
try:
|
||||
itemlist = peliculas(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
logger.error(line)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def live(item):
|
||||
logger.debug()
|
||||
|
||||
itemlist =[]
|
||||
for name, values in liveDict().items():
|
||||
itemlist.append(item.clone(title=typo(name,'bold'), fulltitle=name, plot=values['plot'], url=values['url'], id=values['id'], action='play', forcethumb=True, no_return=True))
|
||||
data = session.get(domain + '/cms/routes/epg?include=default').json()['included']
|
||||
|
||||
for key in data:
|
||||
|
||||
if key['type'] == 'channel' and key.get('attributes',{}).get('hasLiveStream', '') and 'Free' in key.get('attributes',{}).get('packages', []):
|
||||
itemlist.append(item.clone(title = typo(key['attributes']['name'], 'bold'),
|
||||
fulltitle = key['attributes']['name'],
|
||||
plot = key['attributes'].get('description', ''),
|
||||
url = "{}/canali/{}".format(host, key['attributes']['alternateId']),
|
||||
id = key['id'],
|
||||
action = 'findvideos'))
|
||||
return support.thumb(itemlist, live=True)
|
||||
|
||||
|
||||
def programs(item):
|
||||
logger.debug()
|
||||
|
||||
itemlist = []
|
||||
data = session.get(domain + '/cms/routes/browse?include=default').json()['included']
|
||||
images = {key['id'] : key['attributes']['src'] for key in data if key['type'] == 'image'}
|
||||
|
||||
channels = {}
|
||||
for key in data:
|
||||
if key['type'] == 'link' and 'Free' in key['attributes']['packages']:
|
||||
logger.debug(jsontools.dump(key))
|
||||
_title = key['attributes'].get('title', key['attributes'].get('name',''))
|
||||
_id = key['relationships']['linkedContent']['data']['id']
|
||||
_thumb = images.get(key['relationships'].get('images', {}).get('data',[{}])[0].get('id'))
|
||||
channels[_title] ={'id':_id, 'thumb':_thumb}
|
||||
|
||||
itemlist = [item.clone(title='Tutti', id=channels['Tutti']['id'], action='peliculas'),
|
||||
item.clone(title='Generi', id=channels['Tutti']['id'], action='genres'),
|
||||
item.clone(title='Per canale', channels=channels, action='channels')]
|
||||
|
||||
return support.thumb(itemlist)
|
||||
|
||||
|
||||
def genres(item):
|
||||
item.action = 'peliculas'
|
||||
itemlist = [
|
||||
item.clone(title='Attualità e inchiesta', args='genere/attualita-e-inchiesta'),
|
||||
item.clone(title='Beauty and style', args='genere/beauty-and-style'),
|
||||
item.clone(title='Serie TV', args='genere/serie-tv'),
|
||||
item.clone(title='Casa', args='genere/casa'),
|
||||
item.clone(title='Comedy', args='genere/comedy'),
|
||||
item.clone(title='Crime', args='genere/crime'),
|
||||
item.clone(title='Documentari', args='genere/documentari'),
|
||||
# item.clone(title='Discovery + Originals', args='genere/discoveryplus-original'),
|
||||
item.clone(title='Food', args='genere/food'),
|
||||
item.clone(title='Medical', args='genere/medical'),
|
||||
item.clone(title='Motori', args='genere/motori'),
|
||||
item.clone(title='Natura', args='genere/natura'),
|
||||
item.clone(title='Paranormal', args='genere/paranormal'),
|
||||
item.clone(title='People', args='genere/people'),
|
||||
item.clone(title='Real Adventure', args='genere/real-adventure'),
|
||||
item.clone(title='Real Life', args='genere/real-life'),
|
||||
item.clone(title='Scienza e Spazio', args='genere/scienza-e-spazio'),
|
||||
item.clone(title='Sex and love', args='genere/sex-and-love'),
|
||||
item.clone(title='Sport', args='genere/sport'),
|
||||
item.clone(title='Talent Show', args='genere/talent-show'),
|
||||
]
|
||||
logger.debug()
|
||||
|
||||
itemlist = []
|
||||
data = session.get('{}/cms/collections/{}?include=default'. format(domain, item.id)).json()['included']
|
||||
collection = {k['id']: k['relationships'].get('show', k['relationships'].get('collection'))['data']['id'] for k in data if k['type'] == 'collectionItem'}
|
||||
|
||||
included = {}
|
||||
for key in data:
|
||||
if key.get('relationships', {}).get('items') and key['type'] == 'collection' and key['attributes']['title'] not in ['A-Z', 'I più visti']:
|
||||
included[key['attributes']['title']] = [k['id'] for k in key['relationships']['items']['data']]
|
||||
|
||||
for title, values in included.items():
|
||||
itemlist.append(item.clone(title=title, action='peliculas', filter=[collection[k] for k in values]))
|
||||
|
||||
itemlist.sort(key=lambda it: it.title)
|
||||
|
||||
return support.thumb(itemlist, genre=True)
|
||||
|
||||
|
||||
def channels(item):
|
||||
logger.debug()
|
||||
|
||||
itemlist = [item.clone(title=k, id=v['id'], thumbnail=v['thumb'], action='peliculas') for k, v in item.channels.items() if k !='Tutti']
|
||||
itemlist.sort(key=lambda it: it.title)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
logger.debug()
|
||||
itemlist =[]
|
||||
if 'search' in item.args:
|
||||
pdict = session.get('{}/content/shows?include=genres,images,primaryChannel.images,contentPackages&page[size]=12&query={}'.format(api, item.text), headers=headers).json()['data']
|
||||
else:
|
||||
pdict = session.get('{}/cms/routes/{}?decorators=viewingHistory&include=default'.format(api, item.args), headers=headers).json()['included']
|
||||
images = list(filter(lambda x: x['type'] == 'image', pdict))
|
||||
|
||||
for key in pdict:
|
||||
if key['type'] == 'show' and 'Free' in str(key.get('relationships',{}).get('contentPackages',{}).get('data',[])):
|
||||
title = key['attributes']['name']
|
||||
plot = key['attributes'].get('description','')
|
||||
url = '{}/programmi/{}'.format(host, key['attributes']['alternateId'])
|
||||
seasons = key['attributes']['seasonNumbers']
|
||||
thumbs = [image['attributes']['src'] for image in images if image['id'] == key['relationships']['images']['data'][0]['id']]
|
||||
thumb = thumbs[0] if thumbs else item.thumbnail
|
||||
fanarts = [image['attributes']['src'] for image in images if len(key['relationships']['images']['data']) > 1 and image['id'] == key['relationships']['images']['data'][1]['id']]
|
||||
fanart = fanarts[0] if fanarts else item.fanart
|
||||
itemlist =[]
|
||||
|
||||
if item.text:
|
||||
data = session.get('{}/cms/routes/search/result?include=default&contentFilter[query]={}'.format(domain, item.text)).json()['included']
|
||||
else:
|
||||
data = session.get('{}/cms/collections/{}?include=default'.format(domain, item.id)).json()['included']
|
||||
|
||||
images = {key['id'] : key['attributes']['src'] for key in data if key['type'] == 'image'}
|
||||
|
||||
for key in data:
|
||||
if key['type'] == 'show' and 'Free' in str(key.get('relationships',{}).get('contentPackages',{}).get('data',[])) and key['attributes']['episodeCount']:
|
||||
|
||||
if item.filter and key['id'] not in item.filter:
|
||||
continue
|
||||
|
||||
thumbId = key['relationships'].get('images',{}).get('data', [{},{},{}])[2].get('id', '')
|
||||
fanartId = key['relationships'].get('images',{}).get('data', [{}])[0].get('id', '')
|
||||
itemlist.append(
|
||||
item.clone(title=typo(title,'bold'),
|
||||
fulltitle=title,
|
||||
plot=plot,
|
||||
url=url,
|
||||
programid=key['attributes']['alternateId'],
|
||||
id=key['id'],
|
||||
seasons=seasons,
|
||||
action='episodios',
|
||||
thumbnail=thumb,
|
||||
fanart=fanart,
|
||||
contentType='tvshow'))
|
||||
item.clone(title=typo(key['attributes']['name'],'bold'),
|
||||
plot=key['attributes'].get('description',''),
|
||||
programid=key['attributes']['alternateId'],
|
||||
seasons=key['attributes']['seasonNumbers'],
|
||||
action='seasons',
|
||||
thumbnail=images[thumbId] if thumbId else item.thumbnail,
|
||||
fanart=images[fanartId] if fanartId else item.fanart,
|
||||
contentType='tvshow'))
|
||||
|
||||
itemlist.sort(key=lambda it: it.title)
|
||||
|
||||
if not itemlist:
|
||||
from core.item import Item
|
||||
itemlist = [Item(title='Nessun Contenuto Free Disponibile', thumbnail=support.thumb('info'))]
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def seasons(item):
|
||||
logger.debug()
|
||||
|
||||
itemlist = []
|
||||
data = session.get('{}/cms/routes/show/{}?include=default'.format(domain, item.programid)).json()['included']
|
||||
|
||||
for key in data:
|
||||
if key['type'] == 'collection':
|
||||
for option in key['attributes']['component']['filters'][0]['options']:
|
||||
itemlist.append(item.clone(title="Stagione {}".format(option['value']),
|
||||
season=int(option['value']),
|
||||
seasonparams=option['parameter'],
|
||||
showparams=key['attributes']['component']['mandatoryParams'],
|
||||
id=key['id'],
|
||||
contentType='season',
|
||||
action='episodios'))
|
||||
break
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.debug()
|
||||
|
||||
itemlist =[]
|
||||
pdict = session.get(api + '/cms/routes/programmi/{}?decorators=viewingHistory&include=default'.format(item.programid), headers=headers).json()['included']
|
||||
data = session.get('{}/cms/collections/{}?include=default&{}&{}'.format(domain, item.id, item.seasonparams, item.showparams)).json()['included']
|
||||
images = {key['id'] : key['attributes']['src'] for key in data if key['type'] == 'image'}
|
||||
|
||||
for key in pdict:
|
||||
if key['type'] == 'collection' and key.get('attributes',{}).get('component',{}).get('id', '') == 'tabbed-content':
|
||||
mandatory = key['attributes']['component'].get('mandatoryParams','')
|
||||
if not mandatory: return [support.Item(title='CONTENUTO PLUS')]
|
||||
for option in key['attributes']['component']['filters'][0]['options']:
|
||||
url = '{}/cms/collections/{}?decorators=viewingHistory&include=default&{}&{}'.format(api, key['id'], mandatory, option['parameter'])
|
||||
seasons = []
|
||||
season = {}
|
||||
try:
|
||||
season = session.get(url, headers=headers).json()
|
||||
seasons.append(season['included'])
|
||||
pages = season['data'].get('meta',{}).get('itemsTotalPages', 0)
|
||||
if pages:
|
||||
for page in range(2,pages + 1):
|
||||
url = '{}/cms/collections/{}?decorators=viewingHistory&include=default&{}&{}&page[items.number]={}'.format(api, key['id'], mandatory, option['parameter'], page)
|
||||
logger.debug(url)
|
||||
season = session.get(url, headers=headers).json()['included']
|
||||
seasons.append(season)
|
||||
except:
|
||||
pass
|
||||
for key in data:
|
||||
if key['type'] == 'video' and 'Free' in str(key.get('relationships',{}).get('contentPackages',{}).get('data',[])):
|
||||
itemlist.append(item.clone(title = "{}x{:02d} - {}".format(item.season, key['attributes']['episodeNumber'], key['attributes']['name']),
|
||||
plot = key['attributes']['description'],
|
||||
episode = key['attributes']['episodeNumber'],
|
||||
contentType = 'episode',
|
||||
action = 'findvideos',
|
||||
thumbnail = images[key['relationships']['images']['data'][0]['id']],
|
||||
id=key['id']))
|
||||
|
||||
for season in seasons:
|
||||
for episode in season:
|
||||
if episode['type'] == 'video' and 'Free' in episode['attributes']['packages']:
|
||||
title = '{}x{:02d} - {}'.format(option['id'], episode['attributes']['episodeNumber'], episode['attributes']['name'])
|
||||
plot = episode['attributes']['description']
|
||||
itemlist.append(
|
||||
item.clone(title=typo(title,'bold'),
|
||||
fulltitle=title,
|
||||
plot=plot,
|
||||
id=episode['id'],
|
||||
action='play',
|
||||
contentType='episode',
|
||||
season=option['id'],
|
||||
episode=episode['attributes']['episodeNumber'],
|
||||
forcethumb=True,
|
||||
no_return=True))
|
||||
itemlist.sort(key=lambda it: it.episode)
|
||||
|
||||
if not itemlist:
|
||||
from core.item import Item
|
||||
itemlist = [Item(title='Nessun Episodio Free Disponibile', thumbnail=support.thumb('info'))]
|
||||
|
||||
if itemlist: itemlist.sort(key=lambda it: (int(it.season), int(it.episode)))
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
if item.livefilter:
|
||||
item.id = liveDict()[item.livefilter]['id']
|
||||
item.fulltitle = item.livefilter
|
||||
item.forcethumb = True
|
||||
item.no_return = True
|
||||
support.thumb(item, live=True)
|
||||
if item.contentType == 'episode': data = session.get('{}/playback/v2/videoPlaybackInfo/{}?usePreAuth=true'.format(api, item.id), headers=headers).json().get('data',{}).get('attributes',{})
|
||||
else: data = session.get('{}/playback/v2/channelPlaybackInfo/{}?usePreAuth=true'.format(api, item.id), headers=headers).json().get('data',{}).get('attributes',{})
|
||||
if data.get('protection', {}).get('drm_enabled',True):
|
||||
def findvideos(item):
|
||||
logger.debug()
|
||||
|
||||
content = 'video' if item.contentType == 'episode' else 'channel'
|
||||
post = {content + 'Id': item.id, 'deviceInfo': {'adBlocker': False,'drmSupported': True}}
|
||||
|
||||
data = session.post('{}/playback/v3/{}PlaybackInfo'.format(domain, content), json=post).json().get('data',{}).get('attributes',{})
|
||||
|
||||
if data.get('protection', {}).get('drmEnabled',False):
|
||||
item.url = data['streaming']['dash']['url']
|
||||
item.drm = 'com.widevine.alpha'
|
||||
item.license = data['protection']['schemes']['widevine']['licenseUrl'] + '|PreAuthorization=' + data['protection']['drmToken'] + '|R{SSM}|'
|
||||
item.license ="{}|PreAuthorization={}|R{{SSM}}|".format(data['protection']['schemes']['widevine']['licenseUrl'], data['protection']['drmToken'])
|
||||
else:
|
||||
item.url = data['streaming']['hls']['url']
|
||||
item.url = data['streaming'][0]['url']
|
||||
item.manifest = 'hls'
|
||||
return [item]
|
||||
|
||||
return support.server(item, itemlist=[item], Download=False, Videolibrary=False)
|
||||
@@ -2,9 +2,9 @@
|
||||
"id": "dreamsub",
|
||||
"name": "DreamSub",
|
||||
"language": ["ita", "sub-ita"],
|
||||
"active": true,
|
||||
"active": false,
|
||||
"thumbnail": "dreamsub.png",
|
||||
"banner": "dreamsub.png",
|
||||
"categories": ["anime", "vos"],
|
||||
"settings": []
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,7 @@ def peliculas(item):
|
||||
|
||||
if len(item.args) > 1 and item.args[0] == 'last':
|
||||
patronBlock = r'<div id="%s"[^>]+>(?P<block>.*?)<div class="vistaDettagliata"' % item.args[1]
|
||||
patron = r'<li>\s*<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)" class="thumb">[^>]+>[^>]+>[^>]+>\s*[EePp]+\s*(?P<episode>\d+)[^>]+>\s<img src="(?P<thumb>[^"]+)"'
|
||||
patron = r'<li>\s*<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)" class="thumb">[^>]+>[^>]+>[^>]+>\s*[EePp]+\s*(?P<episode>\d+)[^>]+>\s+<img src="(?P<thumb>[^"]+)"'
|
||||
else:
|
||||
patron = r'<div class="showStreaming">\s*<b>(?P<title>[^<]+)[^>]+>[^>]+>\s*<span>Lingua:\s*(?:DUB|JAP)?\s*(?P<lang>(?:SUB )?ITA)[^>]+>[<>br\s]+a href="(?P<url>[^"]+)"[^>]+>.*?--image-url:url\(/*(?P<thumb>[^\)]+).*?Anno di inizio</b>:\s*(?P<year>[0-9]{4})'
|
||||
patronNext = '<li class="currentPage">[^>]+><li[^<]+<a href="([^"]+)">'
|
||||
@@ -104,12 +104,13 @@ def peliculas(item):
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
anime = True
|
||||
# debug = True
|
||||
pagination = 100
|
||||
|
||||
if item.data:
|
||||
data = item.data
|
||||
|
||||
patron = r'<div class="sli-name">\s*<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+)<'
|
||||
patron = r'<div class="sli-name">\s*<a\s+href="(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+)<'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"id": "dsda",
|
||||
"name": "D.S.D.A",
|
||||
"language": ["ita"],
|
||||
"active": false,
|
||||
"thumbnail": "dsda.png",
|
||||
"banner": "dsda.png",
|
||||
"categories": ["documentary"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per documentaristreamingda
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
|
||||
host = config.get_channel_url()
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
docu = [('Documentari {bullet bold}',('/elenco-documentari','peliculas')),
|
||||
('Categorie {submenu}',('','menu')),
|
||||
('Cerca... {bullet bold}',('','search')),]
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
action = 'peliculas'
|
||||
patronMenu = r'<li class="menu-item menu-item-type-taxonomy[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+)<'
|
||||
def fullItemlistHook(itemlist):
|
||||
item_list = []
|
||||
title_list = []
|
||||
for item in itemlist:
|
||||
if item.title not in title_list:
|
||||
item_list.append(item)
|
||||
title_list.append(item.title)
|
||||
itemlist = item_list
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
def newest(categoria):
|
||||
support.info()
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == "documentales":
|
||||
item.url = host + "/elenco-documentari"
|
||||
item.action = "peliculas"
|
||||
return peliculas(item)
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.info(texto)
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
blacklist = ['GUIDA PRINCIPIANTI Vedere film e documentari streaming gratis', 'Guida Dsda']
|
||||
data = support.match(item).data
|
||||
# debug =True
|
||||
if item.args == 'collection':
|
||||
if 'class="panel"' in data:
|
||||
item.args = 'raccolta'
|
||||
patron = r'class="title-episodio">(?P<title>[^<]+)<(?P<url>.*?)<p'
|
||||
# patron = r'<a (?:style="[^"]+" )?href="(?P<url>[^"]+)"[^>]+>(?:[^>]+><strong>)?(?P<title>[^<]+)(?:</a>)?</strong'
|
||||
else:
|
||||
patron = r'<div class="cover-racolta">\s*<a href="(?P<url>[^"]+)"[^>]+>\s*<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)".*?<p class="title[^>]+>(?P<title>[^<]+)<'
|
||||
else:
|
||||
patron = r'<article[^>]+>[^>]+>[^>]+>(?:<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>)?.*?<a href="(?P<url>[^"]+)"[^>]*>\s*(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<p>(?P<plot>[^<]+)<'
|
||||
patronNext = r'<a class="page-numbers next" href="([^"]+)">'
|
||||
|
||||
# select category
|
||||
def itemHook(item):
|
||||
title = support.re.sub(r'(?:[Ss]erie\s*|[Ss]treaming(?:\s*[Dd][Aa])?\s*|[Cc]ollezione\s*|[Rr]accolta\s*|[Dd]ocumentari(?:o)?\s*)?','',item.fulltitle).strip()
|
||||
if 'serie' in item.fulltitle.lower():
|
||||
item.contentType = 'tvshow'
|
||||
item.action = 'episodios'
|
||||
item.contentSerieName = title
|
||||
item.contentTitle = ''
|
||||
elif 'collezion' in item.fulltitle.lower() or \
|
||||
'raccolt' in item.fulltitle.lower() or \
|
||||
'filmografia' in item.fulltitle.lower():
|
||||
item.args = 'collection'
|
||||
item.action = 'peliculas'
|
||||
item.contentTitle = title
|
||||
item.contentSerieName = ''
|
||||
else:
|
||||
item.contentTitle = title
|
||||
item.contentSerieName = ''
|
||||
|
||||
item.title = support.typo(title,'bold')
|
||||
item.fulltitle = item.show = title
|
||||
return item
|
||||
# remove duplicates
|
||||
def fullItemlistHook(itemlist):
|
||||
item_list = []
|
||||
title_list = []
|
||||
for item in itemlist:
|
||||
if item.title not in title_list:
|
||||
item_list.append(item)
|
||||
title_list.append(item.title)
|
||||
itemlist = item_list
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
html = support.match(item, patron=r'class="title-episodio">(\d+x\d+)')
|
||||
data = html.data
|
||||
if html.match:
|
||||
patron = r'class="title-episodio">(?P<episode>[^<]+)<(?P<url>.*?)<p'
|
||||
else:
|
||||
patron = r'class="title-episodio">(?P<title>[^<]+)<(?P<url>.*?)<p'
|
||||
|
||||
# def itemlistHook(itemlist):
|
||||
# counter = 0
|
||||
# for item in itemlist:
|
||||
# episode = support.match(item.title, patron=r'\d+').match
|
||||
# if episode == '1':
|
||||
# counter += 1
|
||||
# item.title = support.typo(str(counter) + 'x' + episode.zfill(2) + support.re.sub(r'\[[^\]]+\](?:\d+)?','',item.title),'bold')
|
||||
# return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
if item.args == 'raccolta' or item.contentType == 'episode':
|
||||
return support.server(item, item.url)
|
||||
else:
|
||||
return support.server(item)
|
||||
@@ -4,7 +4,7 @@
|
||||
# by Greko
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import httptools, support
|
||||
from core import support
|
||||
from core.item import Item
|
||||
|
||||
# def findhost(url):
|
||||
@@ -20,7 +20,7 @@ def mainlist(item):
|
||||
support.info()
|
||||
tvshow = []
|
||||
anime = ['/category/anime-cartoni-animati/']
|
||||
mix = [('Aggiornamenti {bullet bold} {TV}', ['/aggiornamento-episodi/', 'peliculas', 'newest']),
|
||||
mix = [('Aggiornamenti {bullet bold} {TV}', ['/aggiornamento-episodi-nuovi/', 'peliculas', 'newest']),
|
||||
('Archivio {bullet bold} {TV}', ['/category/serie-tv-archive/', 'peliculas'])]
|
||||
search = ''
|
||||
|
||||
@@ -42,6 +42,7 @@ def peliculas(item):
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
# debug = True
|
||||
@@ -83,7 +84,7 @@ def newest(categoria):
|
||||
item.contentType = 'tvshow'
|
||||
item.args = 'newest'
|
||||
try:
|
||||
item.url = "%s/aggiornamento-episodi/" % host
|
||||
item.url = "%s/aggiornamento-nuovi-episodi/" % host
|
||||
item.action = "peliculas"
|
||||
itemlist = peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
@@ -98,4 +99,10 @@ def newest(categoria):
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
return support.server(item, item.other)
|
||||
itemlist = support.server(item, item.other)
|
||||
# testo che tutti i link siano stati risolti
|
||||
if support.logger.testMode:
|
||||
if len(itemlist) < len(support.match(item.other, patron='<a href="([^"]+)').matches):
|
||||
raise Exception('Manca qualche server')
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "eurostreaming_actor",
|
||||
"name": "Eurostreaming Actor",
|
||||
"active": true,
|
||||
"language": ["ita","sub-ita"],
|
||||
"thumbnail": "eurostreaming.png",
|
||||
"banner": "eurostreaming.png",
|
||||
"categories": ["tvshow","anime","vos"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per Eurostreaming.Actor
|
||||
# by Napster32
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
from core.item import Item
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.info()
|
||||
tvshow = []
|
||||
anime = ['/animazione/']
|
||||
mix = [('Aggiornamenti {bullet bold} {TV}', ['/aggiornamento-episodi/', 'peliculas', 'newest'])]
|
||||
search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
action = 'episodios'
|
||||
|
||||
if item.args == 'newest':
|
||||
item.contentType = 'episode'
|
||||
patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>[^<]+) –\s*<a href="(?P<url>[^"]+)"[^>]*>(?P<episode>\d+[×x]\d+-\d+|\d+[×x]\d+) (?P<title2>[^<\(]+)\s?\(?(?P<lang>SUB ITA)?\)?</a>'
|
||||
patronNext = r'class="next".*?"(.+?)"'
|
||||
|
||||
else:
|
||||
patron = r'<div class="post-thumb">.*?<img src="(?P<thumb>[^"]+)".*?><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.+?)[\<]?[/(](?P<year>.*?)[\)|a]'
|
||||
patronNext = r'next.*?href="(.*?)"'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
# debug = True
|
||||
data = support.match(item, headers=headers).data
|
||||
if 'clicca qui per aprire' in data.lower():
|
||||
data = support.match(support.match(data, patron=r'"go_to":"([^"]+)"').match.replace('\\',''), headers=headers).data
|
||||
|
||||
elif 'clicca qui</span>' in data.lower():
|
||||
data = support.match(support.match(data, patron=r'<h2 style="text-align: center;"><a href="([^"]+)">').match, headers=headers).data
|
||||
|
||||
patronBlock = r'tab-content(?P<block>.*?)serie-player'
|
||||
patron = r'data-link="(?P<url>http.*?)".*?data.num..(?P<season>\d+)x(?P<episode>\d+)" data-title="(?P<title>[^"]+)'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.info()
|
||||
|
||||
item.url = host + '/index.php?story=%s&do=search&subaction=search' % (texto)
|
||||
item.contentType = 'tvshow'
|
||||
|
||||
try:
|
||||
return peliculas(item)
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.info(line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.info()
|
||||
|
||||
itemlist = []
|
||||
item = Item()
|
||||
item.contentType = 'tvshow'
|
||||
item.args = 'newest'
|
||||
try:
|
||||
item.url = "%s/aggiornamento-episodi/" % host
|
||||
item.action = "peliculas"
|
||||
itemlist = peliculas(item)
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.info("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
itemlist = support.server(item, item.url)
|
||||
return itemlist
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"id": "fastsubita",
|
||||
"name": "Fastsubita",
|
||||
"language": ["sub-ita"],
|
||||
"active": false,
|
||||
"thumbnail": "fastsubita.png",
|
||||
"banner": "fastsubita.png",
|
||||
"categories": ["tvshow", "vos"],
|
||||
"not_active": ["include_in_newest_peliculas", "include_in_newest_anime"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -1,214 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per fastsubita.py
|
||||
# ------------------------------------------------------------
|
||||
"""
|
||||
|
||||
Su questo canale, nella categoria 'Ricerca Globale'
|
||||
non saranno presenti le voci 'Aggiungi alla Videoteca'
|
||||
e 'Scarica Film'/'Scarica Serie', dunque,
|
||||
la loro assenza, nel Test, NON dovrà essere segnalata come ERRORE.
|
||||
|
||||
Novità. Indicare in quale/i sezione/i è presente il canale:
|
||||
- serie
|
||||
|
||||
Ulteriori info:
|
||||
- SOLO SUB-ITA
|
||||
|
||||
"""
|
||||
from core import support, httptools, scrapertools
|
||||
from core.item import Item
|
||||
from core.support import info
|
||||
from platformcode import config
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
Tvshow = [
|
||||
('Aggiornamenti', ['', 'peliculas', 'update']),
|
||||
('Cerca... {bold}{TV}', ['', 'search'])
|
||||
]
|
||||
|
||||
# search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.info(item)
|
||||
# support.dbg()
|
||||
deflang = 'Sub-ITA'
|
||||
|
||||
# è una singola pagina con tutti gli episodi
|
||||
if item.grouped and not support.scrapertools.find_single_match(item.url, '-[0-9]+x[0-9]+-'):
|
||||
item.grouped = False
|
||||
return episodios_args(item)
|
||||
|
||||
# ogni puntata è un articolo a se
|
||||
if item.fulltitle:
|
||||
item.url = host + '?s=' + item.fulltitle
|
||||
actLike = 'episodios'
|
||||
|
||||
action = 'findvideos'
|
||||
blacklist = ['']
|
||||
if item.args == 'genres':
|
||||
patronBlock = r'<h4 id="mctm1-.">'+item.fulltitle+'</h4>(?P<block>.+?)</div>'
|
||||
patron = r'[^>]+>[^>]+>.+?href="(?P<url>[^"]+)[^>]>(?P<title>[^<]+)\s<'
|
||||
action = 'episodios'
|
||||
elif item.args == 'search':
|
||||
group = True
|
||||
patronBlock = r'</header>(?P<block>.*?)</main>'
|
||||
patron = '(?:<img[^>]+src="(?P<thumb>[^"]+)".*?)?<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+?)(?:(?P<episode>\d+×\d+|\d+×\d+)|\[[sS](?P<season>[0-9]+)[^]]+\])\s?(?:(?P<lang>\([a-zA-Z\s]+\)) (?:[Ss]\d+[Ee]\d+)?\s?(?:[&#\d;|.{3}]+)(?P<title2>[^”[<]+)(?:&#\d)?)?'
|
||||
else:
|
||||
# è una singola pagina con tutti gli episodi
|
||||
if item.args != 'update' and not support.scrapertools.find_single_match(item.url, '-[0-9]+x[0-9]+-'):
|
||||
return episodios_args(item)
|
||||
patron = r'<div class="featured-thumb"> +<a href="(?P<url>[^"]+)" title="(?P<title>[^[]+)\[(?P<episode>\d+×\d+)?'
|
||||
patronBlock = r'<main id="main"[^>]+>(?P<block>.*?)<div id="secondary'
|
||||
|
||||
# def itemlistHook(itemlist):
|
||||
# from core import scraper
|
||||
# return scraper.sort_episode_list(itemlist)
|
||||
|
||||
patronNext = '<a class="next page-numbers" href="(.*?)">Successivi'
|
||||
|
||||
# debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
def episodios_args(item):
|
||||
actLike = 'episodios'
|
||||
# support.dbg()
|
||||
|
||||
deflang = 'Sub-ITA'
|
||||
action = 'findvideos'
|
||||
patron = '(?P<episode>\d+×\d+|\d+[Ã.]+\d+)(?:\s?\((?P<lang>[a-zA-Z ]+)\))?(?:\s[Ss]\d+[Ee]+\d+)? +(?:“|“)(?P<title2>.*?)(?:”|”).*?(?P<other>.*?)(?:/>|<p)'
|
||||
patronBlock = r'<main id="main" class="site-main" role="main">(?P<block>.*?)</main>'
|
||||
patronNext = '<a class="next page-numbers" href="(.*?)">Successivi'
|
||||
|
||||
# debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.info(item)
|
||||
return episodios_args(item)
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
support.info()
|
||||
#support.dbg()
|
||||
|
||||
action = 'peliculas'
|
||||
patronBlock = r'<div id="mcTagMapNav">(?P<block>.+?)</div>'
|
||||
patron = r'<a href="(?P<url>[^"]+)">(?P<title>.+?)</a>'
|
||||
|
||||
def itemHook(item):
|
||||
item.url = host+'/elenco-serie-tv/'
|
||||
item.contentType = 'tvshow'
|
||||
return item
|
||||
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.info('search', item)
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + '?s=' + text
|
||||
try:
|
||||
item.args = 'search'
|
||||
item.contentType = 'tvshow'
|
||||
return peliculas(item)
|
||||
# Se captura la excepcion, para no interrumpir al buscador global si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
info('search log:', line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.info('newest ->', categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
if categoria == 'series':
|
||||
try:
|
||||
item.contentType = 'tvshow'
|
||||
item.args = 'newest'
|
||||
item.url = host
|
||||
item.action = 'peliculas'
|
||||
itemlist = peliculas(item)
|
||||
|
||||
if itemlist[-1].action == 'peliculas':
|
||||
itemlist.pop()
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.info('newest log: ', line)
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.info('findvideos ->', item)
|
||||
patron = r'<a href="([^"]+)">'
|
||||
|
||||
itemlist = []
|
||||
if item.other.startswith('http'):
|
||||
resp = httptools.downloadpage(item.url, follow_redirects=False)
|
||||
data = resp.headers.get("location", "") + '\n'
|
||||
elif item.other:
|
||||
html = support.match(item.other, patron=patron, headers=headers)
|
||||
matches = html.matches
|
||||
data = html.data
|
||||
for scrapedurl in matches:
|
||||
if 'is.gd' in scrapedurl:
|
||||
resp = httptools.downloadpage(scrapedurl, follow_redirects=False)
|
||||
data += resp.headers.get("location", "") + '\n'
|
||||
elif not support.scrapertools.find_single_match(item.url, '-[0-9]+x[0-9]+-'):
|
||||
return episodios(item)
|
||||
else:
|
||||
patronBlock = '<div class="entry-content">(?P<block>.*)<footer class="entry-footer">'
|
||||
html = support.match(item, patron=patron, patronBlock=patronBlock, headers=headers)
|
||||
matches = html.matches
|
||||
data= html.data
|
||||
|
||||
if item.args != 'episodios':
|
||||
item.infoLabels['mediatype'] = 'episode'
|
||||
for scrapedurl in matches:
|
||||
if 'is.gd' in scrapedurl:
|
||||
resp = httptools.downloadpage(scrapedurl, follow_redirects=False)
|
||||
data += resp.headers.get("location", "") + '\n'
|
||||
|
||||
itemlist += support.server(item, data)
|
||||
|
||||
# data = support.match(item.url).data
|
||||
# patron = r'>Posted in <a href="https?://fastsubita.com/serietv/([^/]+)/(?:[^"]+)?"'
|
||||
# series = scrapertools.find_single_match(data, patron)
|
||||
# titles = support.typo(series.upper().replace('-', ' '), 'bold color kod')
|
||||
# goseries = support.typo("Vai alla Serie:", ' bold color kod')
|
||||
# itemlist.append(
|
||||
# item.clone(channel=item.channel,
|
||||
# # title=goseries + titles,
|
||||
# title=titles,
|
||||
# fulltitle=titles,
|
||||
# show=series,
|
||||
# contentType='tvshow',
|
||||
# contentSerieName=series,
|
||||
# url=host+"/serietv/"+series,
|
||||
# action='episodios',
|
||||
# contentTitle=titles,
|
||||
# plot = "Vai alla Serie " + titles + " con tutte le puntate",
|
||||
# ))
|
||||
|
||||
return itemlist
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"id": "film4k",
|
||||
"name": "Film4k",
|
||||
"language": ["ita"],
|
||||
"active": false,
|
||||
"thumbnail": "film4k.png",
|
||||
"banner": "film4k.png",
|
||||
"categories": ["tvshow", "movie", "anime"],
|
||||
"not_active": ["include_in_newest_peliculas", "include_in_newest_anime", "include_in_newest_series"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per film4k
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
from platformcode import logger, config
|
||||
|
||||
|
||||
def findhost(url):
|
||||
return support.httptools.downloadpage(url).url
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = ['movies',
|
||||
('Qualità', ['', 'menu', 'quality']),
|
||||
('Generi', ['movies', 'menu', 'genres']),
|
||||
('Anno', ['movies', 'menu', 'releases']),
|
||||
('Più popolari', ['trending/?get=movies', 'peliculas']),
|
||||
('Più votati', ['ratings/?get=movies', 'peliculas'])]
|
||||
tvshow = ['/tvshows',
|
||||
('Più popolari', ['trending/?get=tv', 'peliculas']),
|
||||
('Più votati', ['ratings/?get=tv', 'peliculas'])]
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.info('search', text)
|
||||
item.url = item.url + "/?s=" + text
|
||||
try:
|
||||
return support.dooplay_search(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
if 'anime' in item.url:
|
||||
return support.dooplay_peliculas(item, True)
|
||||
else:
|
||||
return support.dooplay_peliculas(item, False)
|
||||
|
||||
|
||||
def episodios(item):
|
||||
itemlist = support.dooplay_get_episodes(item)
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
if item.contentType == 'episode':
|
||||
linkHead = support.httptools.downloadpage(item.url, only_headers=True).headers['link']
|
||||
epId = support.scrapertools.find_single_match(linkHead, r'\?p=([0-9]+)>')
|
||||
for link in support.dooplay_get_links(item, host, paramList=[['tv', epId, 1, 'title', 'server']]):
|
||||
itemlist.append(
|
||||
item.clone(action="play", url=link['url']))
|
||||
else:
|
||||
for link, quality in support.match(item.url, patron="(" + host + """links/[^"]+).*?class="quality">([^<]+)""").matches:
|
||||
srv = support.servertools.find_video_items(data=support.httptools.downloadpage(link).data)
|
||||
for s in srv:
|
||||
s.quality = quality
|
||||
itemlist.extend(srv)
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
action = 'peliculas'
|
||||
if item.args in ['genres','releases']:
|
||||
patronBlock = r'<nav class="' + item.args + r'">(?P<block>.*?)</nav'
|
||||
patronMenu= r'<a href="(?P<url>[^"]+)"[^>]*>(?P<title>[^<]+)<'
|
||||
else:
|
||||
patronBlock = r'class="main-header">(?P<block>.*?)headitems'
|
||||
patronMenu = r'(?P<url>' + host + r'quality/[^/]+/\?post_type=movies)">(?P<title>[^<]+)'
|
||||
return locals()
|
||||
@@ -1,35 +0,0 @@
|
||||
{
|
||||
"id": "filmigratis",
|
||||
"name": "Filmi Gratis",
|
||||
"active": false,
|
||||
"language": ["ita", "sub-ita"],
|
||||
"thumbnail": "filmigratis.png",
|
||||
"banner": "filmigratis.png",
|
||||
"categories": ["movie","tvshow"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "@70727",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_series",
|
||||
"type": "bool",
|
||||
"label": "@70727",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_anime",
|
||||
"type": "bool",
|
||||
"label": "@70727",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per Filmi Gratis
|
||||
# ------------------------------------------------------------
|
||||
"""
|
||||
La voce "Al cinema" si riferisce ai titoli che scorrono nella home page
|
||||
|
||||
Problemi:
|
||||
- Nessuno noto
|
||||
|
||||
Novità, il canale, è presente in:
|
||||
- FILM
|
||||
"""
|
||||
import re
|
||||
|
||||
from core import httptools, support
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
host = config.get_channel_url()
|
||||
|
||||
|
||||
|
||||
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
film = [
|
||||
('Al Cinema ', ['', 'peliculas', 'cinema']),
|
||||
('Categorie', ['', 'genres', 'genres']),
|
||||
]
|
||||
|
||||
tvshow = ['/serie/ALL',
|
||||
('Generi', ['', 'genres', 'genres'])
|
||||
]
|
||||
|
||||
search = ''
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.info()
|
||||
|
||||
if item.args == 'search':
|
||||
action = ''
|
||||
patron = r'<div class="cnt">.*?src="([^"]+)"[^>]+>[^>]+>[^>]+>\s+(?P<title>.+?)(?:\[(?P<lang>Sub-ITA|SUB-ITA|SUB)\])?\s?(?:\[?(?P<quality>HD).+\]?)?\s?(?:\(?(?P<year>\d+)?\)?)?\s+<[^>]+>[^>]+>[^>]+>\s<a href="(?P<url>[^"]+)"[^<]+<'
|
||||
patronBlock = r'<div class="container">(?P<block>.*?)</main>'
|
||||
elif item.contentType == 'movie':
|
||||
if not item.args:
|
||||
# voce menu: Film
|
||||
patronBlock = r'<h1>Film streaming ita in alta definizione</h1>(?P<block>.*?)<div class="content-sidebar">'
|
||||
patron = r'<div class="timeline-right">[^>]+>\s<a href="(?P<url>.*?)".*?src="(?P<thumb>.*?)".*?<h3 class="timeline-post-title">(?:(?P<title>.+?)\s\[?(?P<lang>Sub-ITA)?\]?\s?\[?(?P<quality>HD)?\]?\s?\(?(?P<year>\d+)?\)?)<'
|
||||
patronNext = r'<a class="page-link" href="([^"]+)">>'
|
||||
elif item.args == 'cinema':
|
||||
patronBlock = r'<div class="owl-carousel" id="postCarousel">(?P<block>.*?)<section class="main-content">'
|
||||
patron = r'background-image: url\((?P<thumb>.*?)\).*?<h3.*?>(?:(?P<title>.+?)\s\[?(?P<lang>Sub-ITA)?\]?\s?\[?(?P<quality>HD)?\]?\s?\(?(?P<year>\d+)?\)?)<.+?<a.+?<a href="(?P<url>[^"]+)"[^>]+>'
|
||||
elif item.args == 'genres':
|
||||
# ci sono dei titoli dove ' viene sostituito con " da support
|
||||
data = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True).data
|
||||
data = re.sub('\n|\t', ' ', data)
|
||||
patron = r'<div class="cnt">\s.*?src="([^"]+)".+?title="((?P<title>.+?)(?:[ ]\[(?P<lang>Sub-ITA|SUB-ITA)\])?(?:[ ]\[(?P<quality>.*?)\])?(?:[ ]\((?P<year>\d+)\))?)"\s*[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s+<a href="(?P<url>[^"]+)"'
|
||||
patronBlock = r'<div class="container">(?P<block>.*?)</main>'
|
||||
pagination = ''
|
||||
|
||||
patronNext = '<a class="page-link" href="([^"]+)">>>'
|
||||
else:
|
||||
action = 'episodios'
|
||||
patron = r'<div class="cnt">\s.*?src="([^"]+)".+?title="((?P<title>.+?)(?:[ ]\[(?P<lang>Sub-ITA|SUB-ITA)\])?(?:[ ]\[(?P<quality>.*?)\])?(?:[ ]\((?P<year>\d+)\))?)"\s*[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s+<a href="(?P<url>[^"]+)"'
|
||||
## if item.args == 'search':
|
||||
## patron = r'<div class="cnt">.*?src="([^"]+)".+?[^>]+>[^>]+>[^>]+>\s+((?P<title>.+?)(?:[ ]\[(?P<lang>Sub-ITA|SUB-ITA)\])?(?:[ ]\[(?P<quality>.*?)\])?(?:[ ]\((?P<year>\d+)\))?)\s+<[^>]+>[^>]+>[^>]+>[ ]<a href="(?P<url>[^"]+)"'
|
||||
patronBlock = r'<div class="container">(?P<block>.*?)</main>'
|
||||
|
||||
def itemHook(item):
|
||||
if item.args == 'search':
|
||||
if 'series' in item.url:
|
||||
item.action = 'episodios'
|
||||
item.contentType = 'tvshow'
|
||||
else:
|
||||
item.action = 'findvideos'
|
||||
item.contentType = 'movie'
|
||||
return item
|
||||
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.info()
|
||||
|
||||
action = 'findvideos'
|
||||
patronBlock = r'<div class="row">(?P<block>.*?)<section class="main-content">'
|
||||
patron = r'href="(?P<url>.*?)">(?:.+?)?\s+S(?P<season>\d+)\s\-\sEP\s(?P<episode>\d+)[^<]+<'
|
||||
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
support.info()
|
||||
|
||||
if item.contentType == 'movie':
|
||||
action = 'peliculas'
|
||||
patron = r'<a href="(?P<url>.*?)">(?P<title>.*?)<'
|
||||
patronBlock = r'CATEGORIES.*?<ul>(?P<block>.*?)</ul>'
|
||||
else:
|
||||
item.contentType = 'tvshow'
|
||||
action = 'peliculas'
|
||||
blacklist = ['Al-Cinema']
|
||||
patron = r'<a href="(?P<url>.*?)">(?P<title>.*?)<'
|
||||
patronBlock = r'class="material-button submenu-toggle"> SERIE TV.*?<ul>.*?</li>(?P<block>.*?)</ul>'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.info('search', item)
|
||||
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + '/search/?s=' + text
|
||||
try:
|
||||
item.args = 'search'
|
||||
return peliculas(item)
|
||||
# Se captura la excepcion, para no interrumpir al buscador global si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.info('search log:', line)
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
support.info('newest ->', categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.url = host
|
||||
item.contentType = 'movie'
|
||||
item.action = 'peliculas'
|
||||
itemlist = peliculas(item)
|
||||
|
||||
if itemlist[-1].action == 'peliculas':
|
||||
itemlist.pop()
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.info({0}.format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
return support.server(item)
|
||||
@@ -48,13 +48,13 @@ def peliculas(item):
|
||||
patron = r'<li>\s?<a href="(?P<url>[^"]+)" data-thumbnail="(?P<thumb>[^"]+)">.*?<div class="title[^"]*">(?P<title>.+?)(?:\s\[(?P<quality>HD)\])?<\/div>\s*<div class="episode[^"]*"[^>]+>(?P<episode>[^<(]+)(?:\((?P<lang>[a-zA-Z\-]+)\))?'
|
||||
|
||||
if item.args == 'search':
|
||||
action = 'select'
|
||||
action = 'check'
|
||||
elif item.contentType == 'tvshow':
|
||||
action = 'episodios'
|
||||
elif item.contentType == 'movie':
|
||||
action ='findvideos'
|
||||
else:
|
||||
action = 'select'
|
||||
action = 'check'
|
||||
|
||||
def itemHook(item):
|
||||
item.title = item.title.replace(' - La Serie', '')
|
||||
@@ -68,7 +68,7 @@ def episodios(item):
|
||||
data = support.match(item.url, headers=headers).data
|
||||
if 'accordion-item' in data:
|
||||
patronBlock = r'<span class="season[^>]*>\d+[^>]+>[^>]+>[^>]+>[^>]+>\D*(?:STAGIONE|Stagione)[ -]+(?P<lang>[a-zA-Z\- ]+)[^<]*</span>(?P<block>.*?)<div id="(?:season|disqus)'
|
||||
patron = r'<img src="(?P<thumb>[^"]+)">.*?<li class="season-no">(?P<season>\d+)(?:×|×|x)(?P<episode>\d+)[^<0-9]*<\/li>(?P<data>.*?javascript:;">(?P<title>[^<]+).*?</tbody>)'
|
||||
patron = r'<img src="(?P<thumb>[^"]+)"(?:[^>]*>){4}\s*<li class="season-no">(?P<season>\d+)(?:×|×|x)(?P<episode>\d+)[^<0-9]*<\/li>(?P<data>.*?javascript:;">(?P<title>[^<]+).*?</tbody>)'
|
||||
else:
|
||||
patronBlock = r'(?:STAGIONE|Stagione)(?:<[^>]+>)?\s*(?:(?P<lang>[A-Za-z- ]+))?(?P<block>.*?)(?: |<strong>|<div class="addtoany)'
|
||||
patron = r'(?:/>|p>)\s*(?P<season>\d+)(?:×|×|x)(?P<episode>\d+)[^<]+(?P<data>.*?)(?:<br|</p)'
|
||||
@@ -97,7 +97,7 @@ def genres(item):
|
||||
return locals()
|
||||
|
||||
|
||||
def select(item):
|
||||
def check(item):
|
||||
support.info()
|
||||
patron=r'class="taxonomy category"\s*><span property="name">([^>]+)</span></a><meta property="position" content="2">'
|
||||
block = support.match(item.url, patron=patron,headers=headers).match
|
||||
@@ -113,7 +113,7 @@ def select(item):
|
||||
|
||||
def search(item, texto):
|
||||
support.info()
|
||||
item.url = host + "/?s=" + texto
|
||||
item.url = host + "/search/" + texto
|
||||
item.args = 'search'
|
||||
try:
|
||||
return peliculas(item)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "filmstreaming",
|
||||
"name": "Film Streaming",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"thumbnail": "filmstreaming.png",
|
||||
"banner": "filmstreaming.png",
|
||||
"categories": ["movie"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per filmstreaming
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = ['/film',
|
||||
('Al Cinema', ['/cinema', 'peliculas']),
|
||||
('Ultimi Inseriti', ['', 'peliculas', 'last']),
|
||||
('Generi', ['', 'genres', 'genres']),
|
||||
('Anno', ['', 'genres', 'years'])]
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.debug('search', text)
|
||||
itemlist = []
|
||||
text = text.replace(" ", "+")
|
||||
item.url = '{}/index.php?do=search&subaction=search&story={}'.format(host, text)
|
||||
|
||||
try:
|
||||
return peliculas(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("search except: %s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.debug(categoria)
|
||||
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == "peliculas":
|
||||
item.url = host
|
||||
item.action = "peliculas"
|
||||
item.contentType = 'movie'
|
||||
item.args = 'last'
|
||||
itemlist = peliculas(item)
|
||||
if itemlist[-1].action == "peliculas":
|
||||
itemlist.pop()
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
# debug=True
|
||||
if item.args == 'last':
|
||||
patronBlock = r'inseriti:(?P<block>.*?)<div class="block-showmore'
|
||||
patron = r'item-movie">[^>]+><a href="(?P<url>[^"]+)[^>]+><img data-src="(?P<thumb>[^"]+)(?:[^>]+>){6}(?P<title>[^<]+)(?:[^>]+>){4}(?P<year>\d+)?(?:[^>]+>){2}(?P<quality>[^<]+)'
|
||||
# patron = r'item-movie">[^>]+><a href="(?P<url>[^"]+)[^>]+><img data-src="(?P<thumb>[^"]+)(?:[^>]+>){6}(?P<title>[^<]+)(?:[^>]+>){6}(?P<quality>[^<]+)'
|
||||
patronNext = r'<a href="([^"]+)">&rarr'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
action = "peliculas"
|
||||
_type ={'years':'Anno', 'genres':'Categorie'}
|
||||
|
||||
patronBlock = _type[item.args] + r'(?:[^>]+>){4}(?P<block>.*?)</ul>'
|
||||
patronMenu = '<li><a href="(?P<url>[^"]+)">(?P<title>.*?)</a>'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
urls = []
|
||||
data = support.match(item.url).data
|
||||
urls += support.match(data, patron=r'<span data-link="([^"]+)').matches
|
||||
url = support.match(data, patron='<iframe [^>]+src="([^"]+)').match
|
||||
if url:
|
||||
urls.append(support.match(url).data)
|
||||
return support.server(item, urls)
|
||||
@@ -2,7 +2,7 @@
|
||||
"id": "guardaseriecam",
|
||||
"name": "GuardaSerie Cam",
|
||||
"language": ["ita", "sub-ita"],
|
||||
"active": false,
|
||||
"active": true,
|
||||
"thumbnail": "https://raw.githubusercontent.com/32Dexter/DexterRepo/master/media/guardaserie_live.png",
|
||||
"banner": "",
|
||||
"categories": ["tvshow"],
|
||||
|
||||
@@ -35,18 +35,19 @@ def list(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
# debug = True
|
||||
patron = r'<div class="mlnh-thumb"><a href="(?P<url>[^"]+).*?title="(?P<title>[^"]+).*?src="(?P<thumb>[^"]+).*?hdn">(?P<year>[0-9]{4})'
|
||||
patronNext = 'pagenavi.*?<span>.</span>.*?<a href="([^"]+)'
|
||||
patronNext = 'pagenavi.*?<a href="([^"]+)">\d+'
|
||||
action = 'episodios'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
patronBlock = r'<div class="tab-pane fade" id="season-(?P<season>.)"(?P<block>.*?)</div>'
|
||||
patronBlock = r'<div class="tab-pane fade" id="season-(?P<season>.)"(?P<block>.*?)</ul>\s*</div>'
|
||||
patron = r'<a href="#" allowfullscreen data-link="(?P<url>[^"]+).*?title="(?P<title>[^"]+)(?P<lang>[sS][uU][bB]-?[iI][tT][aA])?\s*">(?P<episode>[^<]+)'
|
||||
action = 'findvideos'
|
||||
# debug = True
|
||||
# debugBlock = True
|
||||
return locals()
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "guardaserieclick",
|
||||
"name": "GuardaSerie.click",
|
||||
"active": true,
|
||||
"active": false,
|
||||
"language": ["ita", "vos"],
|
||||
"thumbnail": "guardaserieclick.png",
|
||||
"bannermenu": "guardaserieclick.png",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"id": "guardaserieicu",
|
||||
"name": "Guarda Serie Icu",
|
||||
"language": ["ita", "sub-ita"],
|
||||
"active": true,
|
||||
"active": false,
|
||||
"thumbnail": "https://raw.githubusercontent.com/32Dexter/DexterRepo/master/media/guarda_serie.jpg",
|
||||
"banner": "",
|
||||
"categories": ["tvshow"],
|
||||
|
||||
@@ -18,27 +18,32 @@ host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
tvshow = ['/serie']
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
patronBlock = r'movies-list movies-list-full(?P<block>.*?)footer>'
|
||||
patron = r'<div data-movie-id[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>[^>]+>[^>]+><img src="(?P<thumbnail>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+).*?jt-info[^>]+>[^:]+:\s*(?P<rating>[^<]+)[^>]+>[^>]+>[^>]+>(?P<year>\d*)[^>]+>[^>]+>[^>]+>(?P<duration>\d*)'
|
||||
# debug = True
|
||||
# patronBlock = r'movies-list movies-list-full(?P<block>.*?)footer>'
|
||||
if item.args == 'search':
|
||||
patron = r'<div data-movie-id[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>(?:\s*<span class="mli-quality">(?P<quality>[^>]+)</span>)?\s*<img src="(?P<thumbnail>[^"]+)[^>]+>[^>]+>[^>]+>(?P<title>[^<]+).*?jt-info[^>]+>[^:]+:\s*(?P<rating>[^<]+)[^>]+>[^>]+>[^>]+>(?P<year>\d*)[^>]+>[^>]+>[^>]+>(?P<duration>\d*).*?"f-desc">(?:\s*<p>(?P<plot>[^<]+))?'
|
||||
else:
|
||||
patron = r'<div data-movie-id[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>[^>]+>[^>]+><img src="(?P<thumbnail>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+).*?jt-info[^>]+>[^:]+:\s*(?P<rating>[^<]+)[^>]+>[^>]+>[^>]+>(?P<year>\d*)[^>]+>[^>]+>[^>]+>(?P<duration>\d*)'
|
||||
patronNext = '<li class=.active.>.*?href=.(.*?).>'
|
||||
action = 'episodios'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
patronBlock = r'<strong>Stagione (?P<season>[0-9]+)(?P<block>.*?)</div></div>'
|
||||
patron = r'<a href="(?P<url>[^"]+)">\s*Episodio\s*(?P<episode>[0-9]+)'
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
info(text)
|
||||
item.contentType = 'tvshow'
|
||||
@@ -53,6 +58,7 @@ def search(item, text):
|
||||
|
||||
return []
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.info('findvideos', item)
|
||||
data = support.match(item, headers=headers, patron=r'div class="movieplay">([^>]+)').matches
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ def peliculas(item):
|
||||
pagination = ''
|
||||
patron = r'<a title="(?P<title>[^\(]+)\(\s*(?P<year>\d+)\)\s\D+(?P<quality>\d+p).{3}(?P<lang>[^ ]+).*?[^"]+"\s*href="(?P<url>[^"]+)'
|
||||
else:
|
||||
patron = r'<a href="(?P<url>[^"]+)" (?:rel="?[0-9]+"?)? title="(?P<title>[^\(]+)(?!\()\s*\((?P<year>\d+)\)\s(?:[^\]]+\])?\D+(?P<quality>\d+p).{3}(?P<lang>[^ ]+).*?<img id="?cov"?.*?src="(?P<thumb>[^"]+)'
|
||||
patron = r'<a href="(?P<url>[^"]+)" (?:rel="?[0-9]+"?)? title="(?P<title>[^"]+)(?!\()\s*\((?P<year>\d+)\)\s(?:[^\]]+\])?\D+(?P<quality>\d+p).{3}(?P<lang>[^ ]+).*?<img id="?cov"?.*?src="(?P<thumb>[^"]+)'
|
||||
patronNext = r'current(?:[^>]*>){2}\s*<a class="[^"]+"\s* href="([^"]+)'
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -46,12 +46,19 @@ def mainlist(item):
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
# debug = True
|
||||
action = 'findvideos'
|
||||
sceneTitle = item.args[2]
|
||||
if item.args[1] in ['tvshow', 'anime', 'music', 'other']:
|
||||
patron = r'>[^"<]+'
|
||||
else:
|
||||
patron = r'>(?P<quality>[^"<]+)'
|
||||
patron += '</td> <TD[^>]+><A class="tab" HREF="(?P<url>[^"]+)"\s*>(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<size>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<seed>[^<]+)'
|
||||
patron += '<TD[^>]+><A class="tab" HREF="(?P<url>[^"]+)"\s*>[^<]+<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<size>[^<]+)<[^>]+>[^>]+>[^>]+><form action="[^"]+/\d+/(?P<title>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<seed>[^<]+)'
|
||||
|
||||
def itemHook(item):
|
||||
if not sceneTitle:
|
||||
item.title = item.title.replace('_', ' ')
|
||||
item.title = support.scrapertools.decodeHtmlentities(support.urlparse.unquote(item.title))
|
||||
return item
|
||||
|
||||
if 'search' not in item.args:
|
||||
item.url += str(item.args[0])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "ilgeniodellostreaming",
|
||||
"name": "IlGenioDelloStreaming",
|
||||
"active": true,
|
||||
"active": false,
|
||||
"language": ["ita", "sub-ita"],
|
||||
"thumbnail": "ilgeniodellostreaming.png",
|
||||
"banner": "ilgeniodellostreaming.png",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "ilgeniodellostreaming_cam",
|
||||
"name": "IlGenioDelloStreaming CAM",
|
||||
"active": false,
|
||||
"active": true,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "ilgeniodellostreaming.png",
|
||||
"banner": "ilgeniodellostreaming.png",
|
||||
|
||||
@@ -25,15 +25,19 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
if item.args == 'sala':
|
||||
patronBlock = r'insala(?P<block>.*?)<header>'
|
||||
patron = r'<img src="(?P<thumb>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[^<]+)[^>]+>[^>]+>(?P<quality>[^<]+)[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)">(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>(?P<year>\d{4})'
|
||||
elif item.args == 'az':
|
||||
patron = r'<img src="(?P<thumb>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)[^>]+>(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>.*?<span class="labelimdb">(?P<rating>[^>]+)<'
|
||||
if item.text:
|
||||
data = support.httptools.downloadpage(host + '/?s=' + item.text, post={'story': item.text, 'do': 'search', 'subaction': 'search'}).data
|
||||
patron = '<img src="(?P<thumb>[^"]+)(?:[^>]+>){8}\s*<a href="(?P<url>[^"]+)[^>]+>(?P<title>[^<]+)(?:[^>]+>){4}IMDb\s(?P<rating>[^<]+)(?:[^>]+>){2}(?P<year>\d+)'
|
||||
else:
|
||||
patron = r'<img src="(?P<thumb>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[^<]+)[^>]+>[^>]+>(?P<quality>[^<]+)[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)">(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<plot>[^<]+)<[^>]+>'
|
||||
if item.args == 'sala':
|
||||
patronBlock = r'insala(?P<block>.*?)<header>'
|
||||
patron = r'<img src="(?P<thumb>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[^<]+)[^>]+>[^>]+>(?P<quality>[^<]+)[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)">(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>(?P<year>\d{4})'
|
||||
elif item.args == 'az':
|
||||
patron = r'<img src="(?P<thumb>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)[^>]+>(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>.*?<span class="labelimdb">(?P<rating>[^>]+)<'
|
||||
else:
|
||||
patron = r'<img src="(?P<thumb>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[^<]+)[^>]+>[^>]+>(?P<quality>[^<]+)[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)">(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<plot>[^<]+)<[^>]+>'
|
||||
|
||||
patronNext = 'href="([^>]+)">»'
|
||||
patronNext = 'href="([^>]+)">»'
|
||||
|
||||
return locals()
|
||||
|
||||
@@ -55,8 +59,7 @@ def genres(item):
|
||||
|
||||
def search(item, text):
|
||||
info(text)
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + "/search/" + text
|
||||
item.text = text
|
||||
try:
|
||||
return peliculas(item)
|
||||
except:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "italiaserie",
|
||||
"name": "Italia Serie",
|
||||
"active": true,
|
||||
"active": false,
|
||||
"language": ["ita","sub-ita"],
|
||||
"thumbnail": "italiaserie.png",
|
||||
"bannermenu": "italiaserie.png",
|
||||
|
||||
+15
-12
@@ -34,8 +34,8 @@ def mainlist(item):
|
||||
|
||||
|
||||
def live(item):
|
||||
itemlist = [item.clone(title=support.typo('La7', 'bold'), fulltitle='La7', url= host + '/dirette-tv', action='play', forcethumb = True, no_return=True),
|
||||
item.clone(title=support.typo('La7d', 'bold'), fulltitle='La7d', url= host + '/live-la7d', action='play', forcethumb = True, no_return=True)]
|
||||
itemlist = [item.clone(title=support.typo('La7', 'bold'), fulltitle='La7', url= host + '/dirette-tv', action='findvideos', forcethumb = True, no_return=True),
|
||||
item.clone(title=support.typo('La7d', 'bold'), fulltitle='La7d', url= host + '/live-la7d', action='findvideos', forcethumb = True, no_return=True)]
|
||||
return support.thumb(itemlist, live=True)
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ def replay_menu(item):
|
||||
|
||||
@support.scrape
|
||||
def replay(item):
|
||||
action = 'play'
|
||||
action = 'findvideos'
|
||||
patron = r'guida-tv"><[^>]+><[^>]+>(?P<hour>[^<]+)<[^>]+><[^>]+><[^>]+>\s*<a href="(?P<url>[^"]+)"><[^>]+><div class="[^"]+" data-background-image="(?P<t>[^"]+)"><[^>]+><[^>]+><[^>]+><[^>]+>\s*(?P<name>[^<]+)<[^>]+><[^>]+><[^>]+>(?P<plot>[^<]+)<'
|
||||
def itemHook(item):
|
||||
item.title = support.typo(item.hour + ' - ' + item.name,'bold')
|
||||
@@ -99,7 +99,7 @@ def peliculas(item):
|
||||
def episodios(item):
|
||||
data = support.match(item).data
|
||||
# debug = True
|
||||
action = 'play'
|
||||
action = 'findvideos'
|
||||
if '>puntate<' in data:
|
||||
patronBlock = r'>puntate<(?P<block>.*?)home-block-outbrain'
|
||||
url = support.match(data, patron=r'>puntate<[^>]+>[^>]+>[^>]+><a href="([^"]+)"').match
|
||||
@@ -127,7 +127,7 @@ def episodios(item):
|
||||
return locals()
|
||||
|
||||
|
||||
def play(item):
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
if item.livefilter:
|
||||
for it in live(item):
|
||||
@@ -135,13 +135,10 @@ def play(item):
|
||||
item = it
|
||||
break
|
||||
data = support.match(item).data
|
||||
match = support.match(data, patron='/content/entry/data/(.*?).mp4').match
|
||||
if match:
|
||||
url = 'https://awsvodpkg.iltrovatore.it/local/hls/,/content/entry/data/' + support.match(item, patron='/content/entry/data/(.*?).mp4').match + '.mp4.urlset/master.m3u8'
|
||||
item = item.clone(title='Direct', url=url, server='directo', action='play')
|
||||
else:
|
||||
|
||||
url = support.match(data, patron=r'''["]?dash["]?\s*:\s*["']([^"']+)["']''').match
|
||||
if url:
|
||||
preurl = support.match(data, patron=r'preTokenUrl = "(.+?)"').match
|
||||
url = support.match(data, patron=r'''["]?dash["]?\s*:\s*["']([^"']+)["']''').match
|
||||
tokenHeader = {
|
||||
'host': headers['host_token'],
|
||||
'user-agent': headers['user-agent'],
|
||||
@@ -168,4 +165,10 @@ def play(item):
|
||||
lic_url='%s|%s|R{SSM}|'%(license_url, preLic)
|
||||
item.drm = DRM
|
||||
item.license = lic_url
|
||||
return support.servertools.find_video_items(item, data=url)
|
||||
else:
|
||||
match = support.match(data, patron='/content/entry/data/(.*?).mp4').match
|
||||
if match:
|
||||
url = 'https://awsvodpkg.iltrovatore.it/local/hls/,/content/entry/data/' + support.match(item, patron='/content/entry/data/(.*?).mp4').match + '.mp4.urlset/master.m3u8'
|
||||
|
||||
item = item.clone(title='Direct', server='directo', url=url, action='play')
|
||||
return support.server(item, itemlist=[item], Download=False, Videolibrary=False)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"id": "mediasetplay",
|
||||
"name": "Mediaset Play",
|
||||
"name": "Mediaset play infinity [free]",
|
||||
"active": true,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "mediasetplay.png",
|
||||
"banner": "mediasetplay.png",
|
||||
"thumbnail": "mediasetplayinfinity.png",
|
||||
"banner": "mediasetplayinfinity.png",
|
||||
"categories": ["movie", "tvshow", "documentary", "live"],
|
||||
"not_active": ["include_in_newest"],
|
||||
"default_off": ["include_in_global_search"],
|
||||
|
||||
+42
-27
@@ -2,12 +2,14 @@
|
||||
# ------------------------------------------------------------
|
||||
# Canale per Mediaset Play
|
||||
# ------------------------------------------------------------
|
||||
import functools
|
||||
|
||||
from platformcode import logger, config
|
||||
import uuid, datetime, xbmc
|
||||
|
||||
import requests, sys
|
||||
from core import support
|
||||
from core import jsontools, support, httptools
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
from urllib.parse import urlencode, quote
|
||||
else:
|
||||
@@ -23,6 +25,7 @@ loginData = {"client_id": clientid, "platform": "pc", "appName": "web//mediasetp
|
||||
sessionUrl = "https://api.one.accedo.tv/session?appKey=59ad346f1de1c4000dfd09c5&uuid={uuid}&gid=default"
|
||||
|
||||
session = requests.Session()
|
||||
session.request = functools.partial(session.request, timeout=httptools.HTTPTOOLS_DEFAULT_DOWNLOAD_TIMEOUT)
|
||||
session.headers.update({'Content-Type': 'application/json', 'User-Agent': support.httptools.get_user_agent(), 'Referer': host})
|
||||
|
||||
entry = 'https://api.one.accedo.tv/content/entry/{id}?locale=it'
|
||||
@@ -75,19 +78,26 @@ def live(item):
|
||||
stations = res['stations']
|
||||
|
||||
for it in stations.values():
|
||||
logger.debug(jsontools.dump(it))
|
||||
plot = ''
|
||||
title = it['title']
|
||||
url = 'https:' + it['mediasetstation$pageUrl']
|
||||
if 'plus' in title.lower() or 'premium' in title.lower(): continue
|
||||
if 'SVOD' in it['mediasetstation$channelsRights']: continue
|
||||
thumb = it.get('thumbnails',{}).get('channel_logo-100x100',{}).get('url','')
|
||||
if it['callSign'] in allguide:
|
||||
|
||||
guide = allguide[it['callSign']]
|
||||
plot = '[B]{}[/B]\n{}\n\nA Seguire:\n[B]{}[/B]\n{}'.format(guide['currentListing']['mediasetlisting$epgTitle'],
|
||||
guide['currentListing']['description'],
|
||||
guide['nextListing']['mediasetlisting$epgTitle'],
|
||||
guide['nextListing']['description'],)
|
||||
|
||||
itemlist.append(item.clone(title=support.typo(title, 'bold'), fulltitle=title, callSign=it['callSign'], urls=guide['tuningInstruction']['urn:theplatform:tv:location:any'], plot=plot, url=url, action='play', forcethumb=True))
|
||||
plot = '[B]{}[/B]\n{}'.format(guide.get('currentListing', {}).get('mediasetlisting$epgTitle', ''),guide.get('currentListing', {}).get('description', ''))
|
||||
if 'nextListing' in guide.keys():
|
||||
plot += '\n\nA Seguire:\n[B]{}[/B]\n{}'.format(guide.get('nextListing', {}).get('mediasetlisting$epgTitle', ''),guide.get('nextListing', {}).get('description', ''))
|
||||
itemlist.append(item.clone(title=support.typo(title, 'bold'),
|
||||
fulltitle=title, callSign=it['callSign'],
|
||||
# urls=[guide['publicUrl']],
|
||||
plot=plot,
|
||||
url=url,
|
||||
action='findvideos',
|
||||
thumbnail=thumb,
|
||||
forcethumb=True))
|
||||
|
||||
itemlist.sort(key=lambda it: support.channels_order.get(it.fulltitle, 999))
|
||||
support.thumb(itemlist, live=True)
|
||||
@@ -131,7 +141,7 @@ def peliculas(item):
|
||||
else:
|
||||
contentType = 'movie'
|
||||
video_id = it['guid']
|
||||
action = 'play'
|
||||
action = 'findvideos'
|
||||
for k, v in it['thumbnails'].items():
|
||||
if 'image_vertical' in k and not thumb:
|
||||
thumb = v['url'].replace('.jpg', '@3.jpg')
|
||||
@@ -195,15 +205,18 @@ def episodios(item):
|
||||
except: # per i test, xbmc.getLocalizedString non è supportato
|
||||
for month in range(21, 33): months.append('dummy')
|
||||
|
||||
# i programmi tv vanno ordinati per data decrescente, gli episodi delle serie per data crescente
|
||||
order = 'desc' if '/programmi-tv/' in item.url else 'asc'
|
||||
|
||||
itemlist = []
|
||||
res = requests.get('https://feed.entertainment.tv.theplatform.eu/f/PR1GhC/mediaset-prod-all-programs-v2?byCustomValue={subBrandId}{' + item.subbrand +'}&sort=:publishInfo_lastPublished|asc,tvSeasonEpisodeNumber').json()['entries']
|
||||
res = requests.get('https://feed.entertainment.tv.theplatform.eu/f/PR1GhC/mediaset-prod-all-programs-v2?byCustomValue={subBrandId}{' + item.subbrand +'}&sort=:publishInfo_lastPublished|' + order + ',tvSeasonEpisodeNumber').json()['entries']
|
||||
|
||||
for it in res:
|
||||
thumb = ''
|
||||
titleDate = ''
|
||||
if 'mediasetprogram$publishInfo_lastPublished' in it:
|
||||
date = datetime.date.fromtimestamp(it['mediasetprogram$publishInfo_lastPublished'] / 1000)
|
||||
titleDate =' [{} {}]'.format(date.day, months[date.month])
|
||||
titleDate =' [{} {}]'.format(date.day, months[date.month-1])
|
||||
title = '[B]{}[/B]{}'.format(it['title'], titleDate)
|
||||
for k, v in it['thumbnails'].items():
|
||||
if 'image_keyframe' in k and not thumb:
|
||||
@@ -215,29 +228,32 @@ def episodios(item):
|
||||
thumbnail=thumb,
|
||||
forcethumb=True,
|
||||
contentType='episode',
|
||||
action='play',
|
||||
action='findvideos',
|
||||
video_id=it['guid']))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
def findvideos(item):
|
||||
logger.debug()
|
||||
item.no_return=True
|
||||
# support.dbg()
|
||||
mpd = config.get_setting('mpd', item.channel)
|
||||
|
||||
|
||||
lic_url = 'https://widevine.entitlement.theplatform.eu/wv/web/ModularDrm/getRawWidevineLicense?releasePid={pid}&account=http://access.auth.theplatform.com/data/Account/2702976343&schema=1.0&token={token}|Accept=*/*&Content-Type=&User-Agent={ua}|R{{SSM}}|'
|
||||
url = ''
|
||||
|
||||
# support.dbg()
|
||||
if item.urls:
|
||||
url = ''
|
||||
pid = ''
|
||||
Format = 'dash+xml' if mpd else 'x-mpegURL'
|
||||
for it in item.urls:
|
||||
if Format in it['format']:
|
||||
item.url = requests.head(it['publicUrls'][0]).headers['Location']
|
||||
pid = it['releasePids'][0]
|
||||
# Format = 'dash+xml' if mpd else 'x-mpegURL'
|
||||
# for it in item.urls:
|
||||
# if Format in it['format']:
|
||||
item.url = requests.head(item.urls[0], headers={'User-Agent': support.httptools.get_user_agent()}).headers['Location']
|
||||
# pid = it['releasePids'][0]
|
||||
# if mpd and 'widevine' in it['assetTypes']:
|
||||
# break
|
||||
|
||||
if mpd:
|
||||
item.manifest = 'mpd'
|
||||
@@ -246,15 +262,15 @@ def play(item):
|
||||
|
||||
else:
|
||||
item.manifest = 'hls'
|
||||
return[item]
|
||||
return support.server(item, itemlist=[item], Download=False, Videolibrary=False)
|
||||
|
||||
elif item.video_id:
|
||||
payload = '{"contentId":"' + item.video_id + ' ","streamType":"VOD","delivery":"Streaming","createDevice":true}'
|
||||
res = session.post('https://api-ott-prod-fe.mediaset.net/PROD/play/playback/check/v2.0?sid=' + sid, data=payload).json()['response']['mediaSelector']
|
||||
payload = {"contentId":item.video_id, "streamType":"VOD", "delivery":"Streaming", "createDevice":"true", "overrideAppName":"web//mediasetplay-web/5.2.4-6ad16a4"}
|
||||
res = session.post('https://api-ott-prod-fe.mediaset.net/PROD/play/playback/check/v2.0?sid=' + sid, json=payload).json()['response']['mediaSelector']
|
||||
|
||||
else:
|
||||
payload = '{"channelCode":"' + item.callSign + '","streamType":"LIVE","delivery":"Streaming","createDevice":true}'
|
||||
res = session.post('https://api-ott-prod-fe.mediaset.net/PROD/play/playback/check/v2.0?sid=' + sid, data=payload).json()['response']['mediaSelector']
|
||||
payload = {"channelCode":item.callSign, "streamType":"LIVE", "delivery":"Streaming", "createDevice":"true", "overrideAppName":"web//mediasetplay-web/5.2.4-6ad16a4"}
|
||||
res = session.post('https://api-ott-prod-fe.mediaset.net/PROD/play/playback/check/v2.0?sid=' + sid, json=payload).json()['response']['mediaSelector']
|
||||
|
||||
url = res['url']
|
||||
mpd = True if 'dash' in res['formats'].lower() else False
|
||||
@@ -262,7 +278,7 @@ def play(item):
|
||||
if url:
|
||||
|
||||
sec_data = support.match(url + '?' + urlencode(res)).data
|
||||
item.url = support.match(sec_data, patron=r'<video src="([^"]+)').match
|
||||
item.url = support.match(sec_data, patron=r'<video src="([^"]+)').match + '|User-Agent=' + support.httptools.get_user_agent()
|
||||
pid = support.match(sec_data, patron=r'pid=([^|]+)').match
|
||||
|
||||
if mpd and pid:
|
||||
@@ -272,11 +288,10 @@ def play(item):
|
||||
else:
|
||||
item.manifest = 'hls'
|
||||
|
||||
return [item]
|
||||
return support.server(item, itemlist=[item], Download=False, Videolibrary=False)
|
||||
|
||||
|
||||
def get_from_id(item):
|
||||
logger.debug()
|
||||
sessionKey = session.get(sessionUrl.format(uuid=str(uuid.uuid4())), verify=False).json()['sessionKey']
|
||||
session.headers.update({'x-session': sessionKey})
|
||||
res = session.get(entry.format(id=item.args)).json()
|
||||
|
||||
@@ -41,6 +41,10 @@ def peliculas(item):
|
||||
patron= r'<img src="[^"]+" alt="(?P<title>[^"]+)" data-echo="(?P<thumb>[^"]+)"(?:[^>]+>){7}<a href="(?P<url>[^"]+)"'
|
||||
patronNext = r'<a href="([^"]+)">(?:»|»)'
|
||||
typeContentDict = {'': 'music'}
|
||||
def itemHook(item):
|
||||
item.contentType = 'music'
|
||||
item.thumbnail = item.thumbnail.replace('https:','http:')
|
||||
return item
|
||||
return locals()
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"id": "netfreex",
|
||||
"name": "Netfreex",
|
||||
"language": ["ita"],
|
||||
"active": false,
|
||||
"thumbnail": "netfreex.png",
|
||||
"banner": "netfreex.png",
|
||||
"categories": ["tvshow", "movie", "anime"],
|
||||
"not_active": ["include_in_newest_peliculas", "include_in_newest_anime", "include_in_newest_series"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per netfreex
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
|
||||
# def findhost(url):
|
||||
# return 'https://' + support.match('https://netfreex.uno/', patron='value="site:([^"]+)"').match
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = ""
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = ['/film',
|
||||
('Generi', ['', 'menu', 'genres'])
|
||||
]
|
||||
tvshow = ['/serietv']
|
||||
anime = ['/genere/anime']
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.info('search', text)
|
||||
item.url = item.url + "/?s=" + text
|
||||
try:
|
||||
return support.dooplay_search(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
if 'anime' in item.url:
|
||||
return support.dooplay_peliculas(item, True)
|
||||
else:
|
||||
return support.dooplay_peliculas(item, False)
|
||||
|
||||
|
||||
def episodios(item):
|
||||
return support.dooplay_get_episodes(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
from core import jsontools
|
||||
itemlist = []
|
||||
matches = support.match(item, patron=r'<li id="player-option-[0-9]".*?data-type="([^"]+)" data-post="([^"]+)" data-nume="([^"]+)".*?<span class="title".*?>([^<>]+)</span>(?:<span class="server">([^<>]+))?').matches
|
||||
for Type, Post, Nume, Quality, Server in matches:
|
||||
dataAdmin = support.match(host + '/wp-json/dooplayer/v1/post/%s?type=%s&source=%s' %(Post, Type, Nume)).data
|
||||
js = jsontools.load(dataAdmin)
|
||||
link = js['embed_url'] if 'embed_url' in js else ''
|
||||
itemlist.append( item.clone(server=Server, quality=Quality, url=link, action='play'))
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
action = 'peliculas'
|
||||
data = support.match(item, patron=r'<a href="#">Genere<(.*?)</ul').match
|
||||
patronMenu= r'<a href="(?P<url>[^"]+)"[^>]*>(?P<title>[^<]+)<'
|
||||
return locals()
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "paramount",
|
||||
"name": "Paramount Network",
|
||||
"active": true,
|
||||
"active": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "paramount.png",
|
||||
"banner": "paramount.png",
|
||||
|
||||
+19
-14
@@ -7,6 +7,8 @@ from core import support, jsontools
|
||||
from platformcode import autorenumber, logger
|
||||
from collections import OrderedDict
|
||||
|
||||
from specials import videolibrary
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@@ -64,7 +66,7 @@ def live(item):
|
||||
logger.debug()
|
||||
itemlist=[]
|
||||
for key, value in liveDict().items():
|
||||
itemlist.append(item.clone(title=support.typo(key,'bold'), contentTitle=key, fulltitle=key, show=key, url=value['url'], plot=value['plot'], action='play', forcethumb=True, no_return=True))
|
||||
itemlist.append(item.clone(title=support.typo(key,'bold'), contentTitle=key, fulltitle=key, show=key, url=value['url'], plot=value['plot'], action='findvideos', forcethumb=True, no_return=True))
|
||||
return support.thumb(itemlist, live=True)
|
||||
|
||||
|
||||
@@ -107,6 +109,7 @@ def peliculas(item):
|
||||
|
||||
def episodios(item):
|
||||
logger.debug()
|
||||
reEp = r'"isEpisodes":[^,]+,"items":(.*?])'
|
||||
def load_more(url):
|
||||
second_url = host if url.startswith('/') else '' + url.replace('\u002F','/').replace('%5C','/')
|
||||
new_data = support.match(host + second_url).data
|
||||
@@ -114,11 +117,10 @@ def episodios(item):
|
||||
return jsontools.load(match)
|
||||
|
||||
itemlist = []
|
||||
data = []
|
||||
page_data = support.match(item.url).data
|
||||
seasons = support.match(page_data, patron=r'href="([^"]+)"[^>]+>Stagione\s*\d+').matches
|
||||
more = support.match(page_data, patron=r'loadingTitle":[^,]+,"url":"([^"]+)"').match
|
||||
data = jsontools.load(support.scrapertools.decodeHtmlentities(support.match(page_data, patron=r'"isEpisodes":[^,]+,"items":(.*?),"isKidsUI"').match))
|
||||
data = jsontools.load(support.scrapertools.decodeHtmlentities(support.match(page_data, patron=reEp).match))
|
||||
|
||||
if data:
|
||||
if more:
|
||||
@@ -126,7 +128,7 @@ def episodios(item):
|
||||
if seasons:
|
||||
for url in seasons:
|
||||
new_data = support.match(host + url).data
|
||||
data += jsontools.load(support.scrapertools.decodeHtmlentities(support.match(new_data, patron=r'isEpisodes":[^,]+,"items":(.*?),"isKidsUI"').match.replace('\x01','l').replace('\x02','a')))
|
||||
data += jsontools.load(support.scrapertools.decodeHtmlentities(support.match(new_data, patron=reEp).match.replace('\x01','l').replace('\x02','a')))
|
||||
match = support.match(new_data, patron=r'loadingTitle":[^,]+,"url":"([^"]+)"').match
|
||||
if match and match != load_more:
|
||||
data += load_more(match)
|
||||
@@ -153,26 +155,29 @@ def episodios(item):
|
||||
action='findvideos'))
|
||||
|
||||
itemlist.sort(key=lambda item: (item.season, item.episode))
|
||||
if inspect.stack()[1][3] not in ['find_episodes']:
|
||||
if inspect.stack(0)[1][3] not in ['find_episodes']:
|
||||
autorenumber.start(itemlist, item)
|
||||
return support.videolibrary(itemlist, item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.debug()
|
||||
return support.server(item, itemlist=[item.clone(title='Paramount', server='directo', action='play')], Download=False)
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.debug()
|
||||
item.manifest = 'hls'
|
||||
mgid = support.match(item.url, patron=r'uri":"([^"]+)"').match
|
||||
url = 'https://media.mtvnservices.com/pmt/e1/access/index.html?uri=' + mgid + '&configtype=edge&ref=' + item.url
|
||||
ID, rootUrl = support.match(url, patron=[r'"id":"([^"]+)",',r'brightcove_mediagenRootURL":"([^"]+)"']).matches
|
||||
item.url = jsontools.load(support.match(rootUrl.replace('&device={device}','').format(uri = ID)).data)['package']['video']['item'][0]['rendition'][0]['src']
|
||||
return support.server(item, itemlist=[item.clone(title='Paramount', server='directo', action='play')], Download=False, Videolibrary=False)
|
||||
|
||||
if item.livefilter:
|
||||
d = liveDict()[item.livefilter]
|
||||
item = item.clone(title=support.typo(item.livefilter, 'bold'), fulltitle=item.livefilter, url=d['url'], plot=d['plot'], action='play', forcethumb=True, no_return=True)
|
||||
support.thumb(item, live=True)
|
||||
return [item]
|
||||
|
||||
# def play(item):
|
||||
# logger.debug()
|
||||
# item.manifest = 'hls'
|
||||
# mgid = support.match(item.url, patron=r'uri":"([^"]+)"').match
|
||||
# url = 'https://media.mtvnservices.com/pmt/e1/access/index.html?uri=' + mgid + '&configtype=edge&ref=' + item.url
|
||||
# ID, rootUrl = support.match(url, patron=[r'"id":"([^"]+)",',r'brightcove_mediagenRootURL":"([^"]+)"']).matches
|
||||
# item.url = jsontools.load(support.match(rootUrl.replace('&device={device}','').format(uri = ID)).data)['package']['video']['item'][0]['rendition'][0]['src']
|
||||
|
||||
|
||||
# return [item]
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "piratestreaming",
|
||||
"name": "Pirate Streaming",
|
||||
"active": true,
|
||||
"active": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "piratestreaming.png",
|
||||
"bannermenu": "piratestreaming.png",
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "plutotv",
|
||||
"name": "Pluto TV",
|
||||
"active": true,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "plutotv.png",
|
||||
"banner": "plutotv.png",
|
||||
"categories": ["movie", "tvshow", "documentary", "live"],
|
||||
"not_active": ["include_in_newest"],
|
||||
"default_off": ["include_in_global_search"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per Pluto TV
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import uuid, datetime
|
||||
from platformcode import logger, config
|
||||
from core.item import Item
|
||||
from core import support, httptools
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
|
||||
api = 'https://api.pluto.tv'
|
||||
UUID = 'sid={}&deviceId={}'.format(uuid.uuid1().hex, uuid.uuid4().hex)
|
||||
vod_url = '{}/v3/vod/categories?includeItems=true&deviceType=web&'.format(api, UUID)
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
top = [('Dirette {bold}', ['/it/live-tv/', 'live'])]
|
||||
|
||||
menu = sorted([(it['name'], ['/it/on-demand', 'peliculas', it['items']]) for it in httptools.downloadpage(vod_url).json['categories'][1:]])
|
||||
|
||||
search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def live(item):
|
||||
logger.debug()
|
||||
|
||||
now = datetime.datetime.now()
|
||||
start = (now.strftime('%Y-%m-%dT%H:00:00Z'))
|
||||
stop = (now + datetime.timedelta(hours=4)).strftime('%Y-%m-%dT%H:00:00Z')
|
||||
|
||||
|
||||
live_url = '{}/v2/channels.json?{}'.format(api, UUID)
|
||||
guide_url = '{}/v2/channels?start={}&stop={}&{}'.format(api, start, stop, UUID)
|
||||
|
||||
guide = {g['number']:[g['timelines'][0]['title'], g['timelines'][1]['title']] for g in httptools.downloadpage(guide_url).json}
|
||||
|
||||
itemlist = []
|
||||
|
||||
for it in httptools.downloadpage(live_url).json:
|
||||
itemlist.append(item.clone(title= '[B]{}[/B] | {}'.format(it['name'], guide[it['number']][0]),
|
||||
number=it['number'],
|
||||
contentTitle=it['name'],
|
||||
action='findvideos',
|
||||
thumbnail=it['solidLogoPNG']['path'],
|
||||
fanart=it['featuredImage']['path'],
|
||||
plot='{}\n\n[B]A seguire:[/B]\n{}'.format(it['summary'], guide[it['number']][1]),
|
||||
videourl= it['stitched']['urls'][0]['url'].split('?')[0],
|
||||
forcethumb=True))
|
||||
itemlist.sort(key=lambda it: it.number)
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.debug('Search', text)
|
||||
try:
|
||||
item.search = text.lower()
|
||||
item.args = []
|
||||
for it in httptools.downloadpage(vod_url).json['categories'][1:]:
|
||||
item.args.extend(it['items'])
|
||||
return peliculas(item)
|
||||
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
recordlist = []
|
||||
for i, it in enumerate(item.args):
|
||||
if item.search in it['name'].lower():
|
||||
itm = Item(channel=item.channel,
|
||||
url=item.url,
|
||||
title=it['name'],
|
||||
contentTitle=it['name'],
|
||||
contentSerieName= it['name'] if it['type'] == 'series' else '',
|
||||
plot=it['description'],
|
||||
contentType='tvshow' if it['type'] == 'series' else 'movie',
|
||||
action='episodios' if it['type'] == 'series' else 'findvideos',
|
||||
thumbnail= it['covers'][0]['url'],
|
||||
fanart= it['covers'][2]['url'] if len(it['covers']) > 2 else '',
|
||||
id= it['_id'],
|
||||
videourl= it['stitched']['urls'][0]['url'].split('?')[0])
|
||||
|
||||
if i < 20 or item.search:
|
||||
itemlist.append(itm)
|
||||
else:
|
||||
recordlist.append(it)
|
||||
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
if recordlist and not item.search:
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), args=recordlist))
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
seasons = httptools.downloadpage('{}/v3/vod/series/{}/seasons?includeItems=true&deviceType=web&{}'.format(api, item.id, UUID)).json['seasons']
|
||||
for season in seasons:
|
||||
for episode in season['episodes']:
|
||||
itemlist.append(item.clone(title='{}x{:02d} - {}'.format(episode['season'], episode['number'], episode['name']),
|
||||
contrentTitle=episode['name'],
|
||||
contentSeason=episode['season'],
|
||||
contentEpisodeNumber=episode['number'],
|
||||
plot=episode['description'],
|
||||
thumbnail=episode['covers'][1]['url'],
|
||||
videourl=episode['stitched']['urls'][0]['url'].split('?')[0],
|
||||
action='findvideos'))
|
||||
|
||||
if config.get_setting('episode_info'):
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
support.videolibrary(itemlist,item)
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
item.server = 'directo'
|
||||
item.manifest='hls'
|
||||
params = '{}?deviceDNT=0&deviceVersion=unknow&appVersion=unknow&deviceType=web&deviceMake=firefox&deviceModel=firefox&appName=web&{}'
|
||||
item.url = params.format(item.videourl, UUID)
|
||||
return support.server(item, itemlist=[item], Download=False, Videolibrary=False)
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"id": "polpotv",
|
||||
"name": "PolpoTV",
|
||||
"language": ["ita"],
|
||||
"active": false,
|
||||
"thumbnail": "polpotv.png",
|
||||
"banner": "polpotv.png",
|
||||
"categories": ["movie","tvshow"],
|
||||
"not_active":[],
|
||||
"default_off":["include_in_newest"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -1,227 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# KoD - XBMC Plugin
|
||||
# Canale polpotv
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support, jsontools
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
import datetime
|
||||
|
||||
host = config.get_channel_url()
|
||||
|
||||
headers = [['Accept', 'application/ld+json']]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
# menu = [
|
||||
# ('Ultimi Film aggiunti', ['/api/movies', 'peliculas', '']),
|
||||
# ('Ultime Serie TV aggiunte', ['/api/shows', 'peliculas', '']),
|
||||
# ('Generi', ['/api/genres', 'search_movie_by_genre', '']),
|
||||
# ('Anni {film}', ['', 'search_movie_by_year', '']),
|
||||
# ('Cerca... bold', ['', 'search', ''])
|
||||
# ]
|
||||
film = ['/api/movies',
|
||||
('Generi', ['/api/genres', 'search_movie_by_genre', '']),
|
||||
('Anni', ['', 'search_movie_by_year', '']),]
|
||||
|
||||
tvshow=['/api/shows']
|
||||
|
||||
search=''
|
||||
|
||||
return locals()
|
||||
|
||||
def newest(categoria):
|
||||
support.info()
|
||||
item = Item()
|
||||
if categoria == 'peliculas':
|
||||
item.contentType = 'movie'
|
||||
item.url = host + '/api/movies'
|
||||
elif categoria == 'series':
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host+'/api/shows'
|
||||
return peliculas(item)
|
||||
|
||||
def peliculas(item):
|
||||
support.info()
|
||||
itemlist = []
|
||||
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for element in json_object['hydra:member']:
|
||||
if 'shows' not in item.url:
|
||||
item.contentType='movie'
|
||||
else:
|
||||
item.contentType='tvshow'
|
||||
itemlist.append(get_itemlist_element(element, item))
|
||||
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
try:
|
||||
if support.inspect.stack()[1][3] not in ['newest']:
|
||||
support.nextPage(itemlist, item, next_page=json_object['hydra:view']['hydra:next'])
|
||||
except:
|
||||
pass
|
||||
|
||||
return itemlist
|
||||
|
||||
def episodios(item):
|
||||
support.info()
|
||||
itemlist = []
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for season in json_object['seasons']:
|
||||
seas_url=host+season['@id']+'/releases'
|
||||
itemlist_season=get_season(item, seas_url, season['seasonNumber'])
|
||||
if(len(itemlist_season)>0):
|
||||
itemlist.extend(itemlist_season)
|
||||
|
||||
support.videolibrary(itemlist, item, 'color kod bold')
|
||||
support.download(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
def get_season(item, seas_url, seasonNumber):
|
||||
support.info()
|
||||
itemlist = []
|
||||
data = support.match(seas_url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for episode in json_object['hydra:member']:
|
||||
itemlist.append(
|
||||
item.clone(action='findvideos',
|
||||
contentType='episode',
|
||||
title=support.typo(str(seasonNumber)+"x"+str("%02d"%episode['episodeNumber']), 'bold'),
|
||||
url=seas_url,
|
||||
extra=str(len(json_object['hydra:member'])-episode['episodeNumber'])))
|
||||
return itemlist[::-1]
|
||||
|
||||
def search(item, texto):
|
||||
support.info(item.url, "search", texto)
|
||||
itemlist=[]
|
||||
try:
|
||||
item.url = host + "/api/movies?originalTitle="+texto+"&translations.name=" +texto
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for movie in json_object['hydra:member']:
|
||||
item.contentType='movie'
|
||||
itemlist.append(get_itemlist_element(movie,item))
|
||||
item.url = host + "/api/shows?originalTitle="+texto+"&translations.name=" +texto
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for tvshow in json_object['hydra:member']:
|
||||
item.contentType='tvshow'
|
||||
itemlist.append(get_itemlist_element(tvshow,item))
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def search_movie_by_genre(item):
|
||||
support.info()
|
||||
itemlist = []
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
for genre in json_object['hydra:member']:
|
||||
itemlist.append(
|
||||
item.clone(action="peliculas",
|
||||
title=support.typo(genre['name'],'bold'),
|
||||
contentType='movie',
|
||||
url="%s/api/movies?genres.id=%s" %(host,genre['id'])))
|
||||
return support.thumb(itemlist, True)
|
||||
|
||||
|
||||
def search_movie_by_year(item):
|
||||
support.info()
|
||||
now = datetime.datetime.now()
|
||||
year = int(now.year)
|
||||
itemlist = []
|
||||
for i in range(100):
|
||||
year_to_search = year - i
|
||||
itemlist.append(
|
||||
item.clone(channel=item.channel,url="%s/api/movies?releaseDate=%s" %(host,year_to_search),
|
||||
plot="1",
|
||||
type="movie",
|
||||
title=support.typo(year_to_search,'bold'),
|
||||
action="peliculas"))
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
itemlist = []
|
||||
try:
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
array_index=0
|
||||
if item.contentType!='movie':
|
||||
array_index=int(item.extra)
|
||||
for video in json_object['hydra:member'][array_index]['playlist']['videos']:
|
||||
itemlist.append(
|
||||
item.clone(action="play",
|
||||
title='Direct',
|
||||
url=video['src'],
|
||||
server='directo',
|
||||
quality=str(video['size'])+ 'p',
|
||||
folder=False))
|
||||
except:
|
||||
pass
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
def get_itemlist_element(element,item):
|
||||
support.info()
|
||||
contentSerieName = ''
|
||||
contentTitle =''
|
||||
try:
|
||||
if element['originalLanguage']['id']=='it':
|
||||
scrapedtitle=element['originalTitle']
|
||||
else:
|
||||
scrapedtitle=element['translations'][1]['name']
|
||||
if scrapedtitle=='':
|
||||
scrapedtitle=element['originalTitle']
|
||||
except:
|
||||
scrapedtitle=element['originalTitle']
|
||||
try:
|
||||
scrapedplot=element['translations'][1]['overview']
|
||||
except:
|
||||
scrapedplot = ""
|
||||
try:
|
||||
scrapedthumbnail="https:"+element['bestPosters'].values()[0]
|
||||
except:
|
||||
scrapedthumbnail=""
|
||||
# try:
|
||||
# scrapedfanart="http:"+element['backdropPath']
|
||||
# except:
|
||||
# scrapedfanart=""
|
||||
|
||||
infoLabels = {}
|
||||
if item.contentType=='movie':
|
||||
contentTitle = scrapedtitle
|
||||
next_action='findvideos'
|
||||
quality=support.typo(element['lastQuality'].upper(), '_ [] color kod bold')
|
||||
url="%s%s/releases"
|
||||
infoLabels['tmdb_id']=element['tmdbId']
|
||||
else:
|
||||
contentSerieName = scrapedtitle
|
||||
next_action='episodios'
|
||||
quality=''
|
||||
url="%s%s"
|
||||
|
||||
return item.clone(action=next_action,
|
||||
title=support.typo(scrapedtitle, 'bold') + quality,
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle,
|
||||
plot=scrapedplot,
|
||||
# fanart=scrapedfanart,
|
||||
thumbnail=scrapedthumbnail,
|
||||
contentTitle=contentTitle,
|
||||
contentSerieName=contentSerieName,
|
||||
contentType=item.contentType,
|
||||
url=url % (host, element['@id']),
|
||||
infoLabels=infoLabels)
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"id": "pufimovies",
|
||||
"name": "PufiMovies",
|
||||
"active": false,
|
||||
"language": ["ita", "sub-ita"],
|
||||
"thumbnail": "pufimovies.png",
|
||||
"banner": "pufimovies.png",
|
||||
"categories": ["movie","tvshow"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per PufiMovies
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
|
||||
|
||||
|
||||
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
film = [
|
||||
('Generi', ['', 'menu', 'Film']),
|
||||
('Più Visti', ['','peliculas', 'most'])
|
||||
]
|
||||
|
||||
tvshow = ['',
|
||||
('Generi', ['', 'menu', 'Serie Tv']),
|
||||
('Ultimi Episodi', ['','peliculas', 'last'])
|
||||
]
|
||||
|
||||
search = ''
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
action = 'peliculas'
|
||||
patronBlock = item.args + r' Categorie</a>\s*<ul(?P<block>.*?)</ul>'
|
||||
patronMenu = r'<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^>]+)<'
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.info('search', item)
|
||||
itemlist = []
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + '/search/keyword/' + text
|
||||
try:
|
||||
item.args = 'search'
|
||||
itemlist = peliculas(item)
|
||||
if itemlist[-1].action == 'peliculas':
|
||||
itemlist.pop()
|
||||
return itemlist
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.info('search log:', line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.info(categoria)
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
item.url = host
|
||||
item.action = 'peliculas'
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.contentType = 'movie'
|
||||
itemlist = peliculas(item)
|
||||
else:
|
||||
item.args = 'last'
|
||||
item.contentType = 'tvshow'
|
||||
itemlist = peliculas(item)
|
||||
|
||||
if itemlist[-1].action == 'peliculas':
|
||||
itemlist.pop()
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
if item.contentType == 'tvshow' and not item.args:
|
||||
action = 'episodios'
|
||||
patron = r'<div class="movie-box">\s*<a href="(?P<url>[^"]+)">[^>]+>[^>]+>\D+Streaming\s(?P<lang>[^"]+)[^>]+>[^>]+>[^>]+>(?P<quality>[^<]+)[^>]+>[^>]+>[^>]+>\s*<img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>(?P<rating>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>\s*(?P<year>\d+)'
|
||||
elif item.contentType == 'movie' and not item.args:
|
||||
patron = r'<div class="existing_item col-6 col-lg-3 col-sm-4 col-xl-4">\s*<div class="movie-box">\s*<a href="(?P<url>(?:http(?:s)://[^/]+)?/(?P<type>[^/]+)/[^"]+)">[^>]+>[^>]+>\D+Streaming\s*(?P<lang>[^"]+)">[^>]+>[^>]+>(?P<quality>[^<]+)<[^>]+>[^>]+>[^>]+>\s*<img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>(?P<rating>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>\s*(?:(?P<year>\d+))?[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]*)<'
|
||||
elif item.args == 'last':
|
||||
patron = r'<div class="episode-box">[^>]+>[^>]+>[^>]+>\D+Streaming\s(?P<lang>[^"]+)">[^>]+>[^>]+>(?P<quality>[^<]+)<[^>]+>[^>]+>[^>]+>[^^>]+>[^>]+>\s*<img src="(?P<thumb>[^"]+)"[^[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>[^>]+>(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>\D*(?P<season>\d+)[^>]+>\D*(?P<episode>\d+)'
|
||||
elif item.args == 'most':
|
||||
patron =r'div class="sm-113 item">\s*<a href="(?P<url>[^"]+)">[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s<img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<title>[^<]+)'
|
||||
else:
|
||||
patron = r'<div class="movie-box">\s*<a href="(?P<url>(?:http(?:s)://[^/]+)?/(?P<type>[^/]+)/[^"]+)">[^>]+>[^>]+>\D+Streaming\s*(?P<lang>[^"]+)">[^>]+>[^>]+>(?P<quality>[^<]+)<[^>]+>[^>]+>[^>]+>\s*<img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>(?P<rating>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>\s*(?:(?P<year>\d+))?[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]*)<'
|
||||
typeActionDict = {'findvideos':['movie'], 'episodios':['tvshow']}
|
||||
typeContentDict = {'movie':['movie'], 'tvshow':['tvshow']}
|
||||
patronNext = r'<a href="([^"]+)"[^>]+>»'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
patron = r'<div class="episode-box">[^>]+>[^>]+>[^>]+>\D+Streaming\s(?P<lang>[^"]+)">[^>]+>[^>]+>(?P<quality>[^<]+)<[^>]+>[^>]+>[^>]+>\s*<img src="(?P<thumb>[^"]+)"[^[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>[^>]+>(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>\D*(?P<season>\d+)[^>]+>\D*(?P<episode>\d+)'
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
# match = support.match(item, patron='wstream', debug=True)
|
||||
return support.server(item)
|
||||
+38
-14
@@ -7,7 +7,7 @@ from core.item import Item
|
||||
import datetime, xbmc
|
||||
import requests, sys
|
||||
|
||||
from core import jsontools, support
|
||||
from core import jsontools, scrapertools, support
|
||||
from platformcode import logger
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
@@ -114,7 +114,7 @@ def episodios(item):
|
||||
|
||||
if not itemlist:
|
||||
itemlist = addinfo(items, item)
|
||||
|
||||
# itemlist.sort(key=lambda it: (it.season, it.episode))
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -126,6 +126,7 @@ def epMenu(item):
|
||||
itemlist.append(item.clone(title=support.typo(it['name'], 'bold'), data=[it]))
|
||||
else:
|
||||
itemlist.append(item.clone(title=support.typo(it['name'], 'bold'), season_url=getUrl(it['path_id']), data=''))
|
||||
# itemlist.sort(key=lambda it: it.title)
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -141,7 +142,7 @@ def live(item):
|
||||
current = it['currentItem']
|
||||
next = it['nextItem']
|
||||
plot = '[B]{}[/B]\n{}\n\nA Seguire: [B]{}[/B]\n{}'.format(current['name'], current['description'], next['name'], next['description'])
|
||||
itemlist.append(item.clone(title=title, fulltitle=title, fanart=fanart, plot=plot, url=url, video_url=url + '.json', action='play'))
|
||||
itemlist.append(item.clone(title=title, fulltitle=title, fanart=fanart, plot=plot, url=url, video_url=url + '.json', action='findvideos'))
|
||||
itemlist.sort(key=lambda it: support.channels_order.get(it.fulltitle, 999))
|
||||
support.thumb(itemlist, live=True)
|
||||
return itemlist
|
||||
@@ -195,6 +196,7 @@ def replayChannels(item):
|
||||
support.thumb(itemlist, live=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
def replay(item):
|
||||
logger.debug()
|
||||
|
||||
@@ -207,7 +209,7 @@ def replay(item):
|
||||
plot = info['description'],
|
||||
url = getUrl(it['weblink']),
|
||||
video_url = getUrl(it['path_id']),
|
||||
action = 'play',
|
||||
action = 'findvideos',
|
||||
forcethumb = True)
|
||||
|
||||
|
||||
@@ -215,17 +217,19 @@ def replay(item):
|
||||
items = requests.get(item.channel_url).json().get('events', {})
|
||||
now = datetime.datetime.now()
|
||||
h = int('{}{:02d}'.format(now.hour, now.minute))
|
||||
|
||||
today = now.strftime('%d-%m-%Y')
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
itlist = [executor.submit(itInfo, it) for it in items if it['has_video'] and int(it['hour'].replace(':','')) <= h]
|
||||
itlist = [executor.submit(itInfo, it) for it in items if it['has_video'] and (int(it['hour'].replace(':','')) <= h or item.date != today)]
|
||||
for res in futures.as_completed(itlist):
|
||||
if res.result():
|
||||
itemlist.append(res.result())
|
||||
if not itemlist:
|
||||
return [Item(title='Non ci sono Replay per questo Canale')]
|
||||
itemlist.sort(key=lambda it: it.title)
|
||||
return itemlist
|
||||
|
||||
def play(item):
|
||||
|
||||
def findvideos(item):
|
||||
logger.debug()
|
||||
|
||||
res = requests.get(item.video_url).json()
|
||||
@@ -239,9 +243,9 @@ def play(item):
|
||||
item.drm = 'com.widevine.alpha'
|
||||
item.license = lic + '|' + host + '|R{SSM}|'
|
||||
|
||||
item = item.clone(server='directo', url=url, no_return=True, manifest='hls')
|
||||
item = item.clone(server='directo', url=url, no_return=True) # , manifest='hls')
|
||||
|
||||
return [item]
|
||||
return support.server(item, itemlist=[item], Download=False, Videolibrary=False)
|
||||
|
||||
|
||||
def getUrl(url):
|
||||
@@ -257,20 +261,36 @@ def getUrl(url):
|
||||
|
||||
|
||||
def addinfo(items, item):
|
||||
def itInfo(key, item):
|
||||
logger.debug(jsontools.dump(key))
|
||||
def itInfo(n, key, item):
|
||||
logger.debug()
|
||||
item.forcethumb = True
|
||||
episode = 0
|
||||
season = 0
|
||||
if key.get('titolo', ''):
|
||||
key = requests.get(getUrl(key['path_id'])).json()['program_info']
|
||||
|
||||
|
||||
info = requests.get(getUrl(key['info_url'])).json() if 'info_url' in key else {}
|
||||
details = info.get('details',{})
|
||||
for detail in details:
|
||||
if detail['key'] == 'season':
|
||||
s = scrapertools.find_single_match(detail['value'], '(\d+)')
|
||||
if s: season = int(s)
|
||||
if detail['key'] == 'episode':
|
||||
e = scrapertools.find_single_match(detail['value'], '(\d+)')
|
||||
if e: episode = int(e)
|
||||
|
||||
images = info.get('images', {})
|
||||
fanart = images.get('landscape', '')
|
||||
thumb = images.get('portrait_logo', '')
|
||||
if not thumb: thumb = fanart
|
||||
title = key.get('name', '')
|
||||
if key.get('episode_title'):
|
||||
title = key.get('episode_title')
|
||||
if episode:
|
||||
title = '{:02d}. {}'.format(episode, title)
|
||||
if season:
|
||||
title = '{}x{}'.format(season, title)
|
||||
|
||||
it = item.clone(title=support.typo(title, 'bold'),
|
||||
data='',
|
||||
@@ -280,10 +300,13 @@ def addinfo(items, item):
|
||||
fanart=getUrl(fanart),
|
||||
url=getUrl(key.get('weblink', '')),
|
||||
video_url=getUrl(key['path_id']),
|
||||
plot=info.get('description', ''))
|
||||
season=season,
|
||||
episode=episode,
|
||||
plot=info.get('description', ''),
|
||||
order=n)
|
||||
|
||||
if 'Genere' not in key.get('sub_type', '') and ('layout' not in key or key['layout'] == 'single'):
|
||||
it.action = 'play'
|
||||
it.action = 'findvideos'
|
||||
it.contentTitle = it.fulltitle
|
||||
else:
|
||||
it.action = 'episodios'
|
||||
@@ -292,8 +315,9 @@ def addinfo(items, item):
|
||||
|
||||
itemlist = []
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
itlist = [executor.submit(itInfo, it, item) for it in items]
|
||||
itlist = [executor.submit(itInfo, n, it, item) for n, it in enumerate(items)]
|
||||
for res in futures.as_completed(itlist):
|
||||
if res.result():
|
||||
itemlist.append(res.result())
|
||||
itemlist.sort(key=lambda it: it.order)
|
||||
return itemlist
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"id": "seriehd",
|
||||
"name": "SerieHD",
|
||||
"active": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "seriehd.png",
|
||||
"banner": "seriehd.png",
|
||||
"categories": ["tvshow"],
|
||||
"settings": [],
|
||||
"cloudflare": true
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per SerieHD
|
||||
# ------------------------------------------------------------
|
||||
|
||||
|
||||
from core import support
|
||||
def findhost(url):
|
||||
return support.match(url, patron=r'<h2[^>]+><a href="([^"]+)"').match
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
tvshow = [('Genere', ['', 'menu', 'genre']),
|
||||
('A-Z', ['', 'menu', 'a-z']),
|
||||
('In Corso', ['/category/serie-tv-streaming/serie-in-corso', 'peliculas']),
|
||||
('Complete', ['/category/serie-tv-streaming/serie-complete', 'peliculas']),
|
||||
('Americane', ['/category/serie-tv-streaming/serie-tv-americane', 'peliculas']),
|
||||
('Italiane', ['/category/serie-tv-streaming/serie-tv-italiane', 'peliculas']),
|
||||
('Ultimi Episodi', ['/aggiornamenti', 'peliculas', 'last']),
|
||||
('Evidenza', ['', 'peliculas', 'best'])]
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.info(texto)
|
||||
|
||||
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore .
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.info(categoria)
|
||||
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
item.url = host + '/aggiornamenti'
|
||||
item.args = 'last'
|
||||
try:
|
||||
if categoria == "series":
|
||||
item.contentType = 'tvshow'
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
# debug = True
|
||||
|
||||
if item.args == 'last':
|
||||
action = 'findvideos'
|
||||
patron = r'singleUpdate">(?:[^>]+>){2}\s*<img src="(?P<thumb>[^"]+)"(?:[^>]+>){3}\s*<h2>(?P<title>[^<]+)<(?:[^>]+>){14,16}\s*<a href="(?P<url>[^"]+)">(?:[^>]+>){3}\s*(?P<season>\d+)\D+(?P<episode>\d+)(?:[^\(]*\()?(?P<lang>[^\)]+)?(?:\))?'
|
||||
elif item.args == 'best':
|
||||
action='episodios'
|
||||
patron = r'col-md-3">\s*<a href="(?P<url>[^"]+)">[^>]+>\s*<div class="infoVetrina">[^>]+>(?P<year>\d{4})(?:[^>]+>){2}(?P<title>[^<]+)<(?:[^>]+>){4}(?P<rating>[^<]+)(?:[^>]+>){4}\s*<img src="(?P<thumb>[^"]+)"'
|
||||
else:
|
||||
action='episodios'
|
||||
# patron = r'<a href="(?P<url>[^"]+)">[^>]+>\s*<div class="infoSeries">\s*<h2>(?P<title>[^<]+)<(?:[^>]+>){5}(?P<rating>[^<]+)?(?:[^>]+>){3}\s*<img src="(?P<thumb>[^"]+)"(?:[^>]+>){3}(?P<quality>[^<]+)<(?:[^>]+>){2}(?P<year>\d{4})'
|
||||
patron = r'<a href="(?P<url>[^"]+)">[^>]+>\s*<div class="infoSeries">\s*<h2>(?P<title>[^<]+?)(?:\[(?P<lang>[^\]]+)\])?<(?:[^>]+>){5}(?P<rating>[^<]+)?(?:[^>]+>){3}\s*(?:<img src="(?P<thumb>[^"]+)"[^>]+>)?(?:[^>]+>){0,2}(?P<quality>[^<]+)<(?:[^>]+>){2}(?P<year>\d{4})'
|
||||
patronNext=r'next page-numbers" href="([^"]+)"'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
def get_season(pageData, seas_url, season):
|
||||
data = ''
|
||||
episodes = support.match(pageData if pageData else seas_url, patronBlock=patron_episode, patron=patron_option).matches
|
||||
for episode_url, episode in episodes:
|
||||
# episode_url = support.urlparse.urljoin(item.url, episode_url)
|
||||
# if '-' in episode: episode = episode.split('-')[0].zfill(2) + 'x' + episode.split('-')[1].zfill(2)
|
||||
title = season + "x" + episode.zfill(2) + ' - ' + item.fulltitle
|
||||
data += title + '|' + episode_url + '\n'
|
||||
return data
|
||||
|
||||
patron_season = '<div class="[^"]+" id="seasonsModal"[^>]+>(.*?)</ul>'
|
||||
patron_episode = '<div class="[^"]+" id="episodesModal"[^>]+>(.*?)</ul>'
|
||||
patron_option = r'<a href="([^"]+?)".*?>(?:Stagione |Episodio )([^<]+?)</a>'
|
||||
|
||||
url = support.match(item, patron=r'<iframe id="iframeVid" width="[^"]+" height="[^"]+" src="([^"]+)" allowfullscreen').match
|
||||
seasons = support.match(url, patronBlock=patron_season, patron=patron_option)
|
||||
|
||||
data = ''
|
||||
|
||||
# debugging
|
||||
# support.dbg()
|
||||
# for i, season in enumerate(seasons.matches):
|
||||
# data += get_season(seasons.data if i == 0 else '', season[0], season[1])
|
||||
import sys
|
||||
if sys.version_info[0] >= 3: from concurrent import futures
|
||||
else: from concurrent_py2 import futures
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
thL = []
|
||||
for i, season in enumerate(seasons.matches):
|
||||
thL.append(executor.submit(get_season, seasons.data if i == 0 else '', season[0], season[1]))
|
||||
for res in futures.as_completed(thL):
|
||||
if res.result():
|
||||
data += res.result()
|
||||
# debug = True
|
||||
patron = r'(?P<season>\d+)x(?P<episode>\d+)\s*-\s*(?P<title>[^\|]+)\|(?P<url>[^ ]+)'
|
||||
action = 'findvideos'
|
||||
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.sort(key=lambda item: (item.infoLabels['season'], item.infoLabels['episode']))
|
||||
return itemlist
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
if item.args == 'genre':
|
||||
patronMenu = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a>'
|
||||
else:
|
||||
patronMenu = r'<a href="(?P<url>[^"]+)" class="">(?P<title>[^<]+)'
|
||||
|
||||
blacklist = ['Serie TV Streaming','Serie TV Americane','Serie TV Italiane','Serie Complete','Serie in Corso','altadefinizione']
|
||||
action = 'peliculas'
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
item.url = item.url.replace('&', '&')
|
||||
support.info(item)
|
||||
if item.args == 'last':
|
||||
url = support.match(item, patron = r'<iframe id="iframeVid" width="[^"]+" height="[^"]+" src="([^"]+)" allowfullscreen').match
|
||||
matches = support.match(url,patron=r'<a href="([^"]+)">(\d+)<', patronBlock=r'<h3>EPISODIO</h3><ul>(.*?)</ul>').matches
|
||||
if matches: item.url = support.urlparse.urljoin(url, matches[-1][0])
|
||||
return support.hdpass_get_servers(item)
|
||||
|
||||
|
||||
def play(item):
|
||||
if 'hdpass' in item.url:
|
||||
return support.hdpass_get_url(item)
|
||||
return [item]
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"id": "serietvonline",
|
||||
"name": "SerieTvOnline",
|
||||
"active": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "serietvonline.png",
|
||||
"bannermenu": "serietvonline.png",
|
||||
"categories": ["anime","tvshow","movie","documentary"],
|
||||
"not_active": ["include_in_newest_anime"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -1,184 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per serietvonline.py
|
||||
# ----------------------------------------------------------
|
||||
"""
|
||||
Novità. Indicare in quale/i sezione/i è presente il canale:
|
||||
- film, serie
|
||||
|
||||
Avvisi:
|
||||
- Al massimo 25 titoli per le sezioni: Film
|
||||
- Al massimo 35 titoli per le sezioni: Tutte le altre
|
||||
Per aggiungere in videoteca le Anime:
|
||||
Se hanno la forma 1x01:
|
||||
-si posso aggiungere direttamente dalla pagina della serie, sulla voce in fondo "aggiungi in videoteca".
|
||||
Altrimenti:
|
||||
- Prima fare la 'Rinumerazione' dal menu contestuale dal titolo della serie
|
||||
"""
|
||||
import re
|
||||
from core import support, httptools, scrapertools
|
||||
from platformcode import config
|
||||
from core.item import Item
|
||||
|
||||
|
||||
# def findhost(url):
|
||||
# host = support.match(url, patron=r'href="([^"]+)">\s*cliccando qui').matches[-1]
|
||||
# return host
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.info()
|
||||
|
||||
|
||||
film = ['/ultimi-film-aggiunti/',
|
||||
('A-Z', ['/lista-film/', 'peliculas', 'lista'])
|
||||
]
|
||||
|
||||
tvshow = ['',
|
||||
('Aggiornamenti', ['/ultimi-episodi-aggiunti/', 'peliculas', 'update']),
|
||||
('Tutte', ['/lista-serie-tv/', 'peliculas', 'qualcosa']),
|
||||
('Italiane', ['/lista-serie-tv-italiane/', 'peliculas', 'qualcosa']),
|
||||
('Anni 50-60-70-80', ['/lista-serie-tv-anni-60-70-80/', 'peliculas', 'qualcosa']),
|
||||
('HD', ['/lista-serie-tv-in-altadefinizione/', 'peliculas', 'qualcosa'])
|
||||
]
|
||||
|
||||
anime = ['/lista-cartoni-animati-e-anime/']
|
||||
|
||||
documentari = [('Documentari {bullet bold}', ['/lista-documentari/' , 'peliculas' , 'doc', 'tvshow'])]
|
||||
|
||||
search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.info()
|
||||
anime = True
|
||||
|
||||
blacklist = ['DMCA', 'Contatti', 'Attenzione NON FARTI OSCURARE', 'Lista Cartoni Animati e Anime']
|
||||
patronBlock = r'<h1>.+?</h1>(?P<block>.*?)<div class="footer_c">'
|
||||
patronNext = r'<div class="siguiente"><a href="([^"]+)" >'
|
||||
# debug = True
|
||||
|
||||
if item.args == 'search':
|
||||
patronBlock = r'>Lista Serie Tv</a></li></ul></div><div id="box_movies">(?P<block>.*?)<div id="paginador">'
|
||||
patron = r'<div class="movie">[^>]+[^>]+>\s*<img src="(?P<thumb>[^"]+)" alt="(?P<title>.+?)(?:(?P<year>\d{4})|")[^>]*>\s*<a href="(?P<url>[^"]+)'
|
||||
elif item.contentType == 'episode':
|
||||
pagination = 35
|
||||
action = 'findvideos'
|
||||
patron = r'<td><a href="(?P<url>[^"]+)"(?:[^>]+)?>\s?(?P<title>.*?)(?P<episode>\d+x\d+)[ ]?(?P<title2>[^<]+)?<'
|
||||
|
||||
elif item.contentType == 'tvshow':
|
||||
# SEZIONE Serie TV- Anime - Documentari
|
||||
pagination = 35
|
||||
|
||||
if not item.args and 'anime' not in item.url:
|
||||
patron = r'<div class="movie">[^>]+>.+?src="(?P<thumb>[^"]+)" alt="[^"]+".+? href="(?P<url>[^"]+)">.*?<h2>(?P<title>[^"]+)</h2>\s?(?:<span class="year">(?P<year>\d+|\-\d+))?<'
|
||||
else:
|
||||
anime = True
|
||||
patron = r'(?:<td>)?<a href="(?P<url>[^"]+)"(?:[^>]+)?>\s?(?P<title>[^<]+)(?P<episode>[\d\-x]+)?(?P<title2>[^<]+)?<'
|
||||
else:
|
||||
# SEZIONE FILM
|
||||
pagination = 25
|
||||
|
||||
if item.args == 'lista':
|
||||
patron = r'href="(?P<url>[^"]+)"[^>]+>(?P<title>.+?)(?:\s(?P<year>\d{4})|<)'
|
||||
patronBlock = r'Lista dei film disponibili in streaming e anche in download\.</p>(?P<block>.*?)<div class="footer_c">'
|
||||
else:
|
||||
patron = r'<tr><td><a href="(?P<url>[^"]+)"(?:|.+?)?>(?: )?[ ]?(?P<title>.*?)[ ]?(?P<quality>HD)?[ ]?(?P<year>\d+)?(?: | HD[^<]*| Streaming[^<]*| MD(?: iSTANCE)? [^<]*)?</a>'
|
||||
|
||||
def itemHook(item):
|
||||
if 'film' in item.url:
|
||||
item.action = 'findvideos'
|
||||
item.contentType = 'movie'
|
||||
elif item.args == 'update':
|
||||
pass
|
||||
else:
|
||||
item.contentType = 'tvshow'
|
||||
item.action = 'episodios'
|
||||
return item
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.info()
|
||||
anime = True
|
||||
action = 'findvideos'
|
||||
patronBlock = r'<table>(?P<block>.*)<\/table>'
|
||||
patron = r'<tr><td>(?P<title>.*?)?[ ](?:Parte)?(?P<episode>\d+x\d+|\d+)(?:|[ ]?(?P<title2>.+?)?(?:avi)?)<(?P<data>.*?)<\/td><tr>'
|
||||
def itemlistHook(itemlist):
|
||||
for i, item in enumerate(itemlist):
|
||||
ep = support.match(item.title, patron=r'\d+x(\d+)').match
|
||||
if ep == '00':
|
||||
item.title = item.title.replace('x00', 'x' + str(i+1).zfill(2)).replace('- ..','')
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.info("CERCA :" ,text, item)
|
||||
|
||||
item.url = "%s/?s=%s" % (host, text)
|
||||
|
||||
try:
|
||||
item.args = 'search'
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.info("%s" % line)
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
support.info(categoria)
|
||||
|
||||
itemlist = []
|
||||
item = Item()
|
||||
|
||||
if categoria == 'peliculas':
|
||||
item.contentType = 'movie'
|
||||
item.url = host + '/ultimi-film-aggiunti/'
|
||||
elif categoria == 'series':
|
||||
item.args = 'update'
|
||||
item.contentType = 'episode'
|
||||
item.url = host +'/ultimi-episodi-aggiunti/'
|
||||
try:
|
||||
item.action = 'peliculas'
|
||||
itemlist = peliculas(item)
|
||||
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.info("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
if item.contentType == 'movie':
|
||||
return support.server(item, headers=headers)
|
||||
else:
|
||||
|
||||
if item.args != 'update':
|
||||
return support.server(item, item.data)
|
||||
else:
|
||||
itemlist = []
|
||||
item.infoLabels['mediatype'] = 'episode'
|
||||
|
||||
data = support.match(item.url, headers=headers).data
|
||||
url_video = scrapertools.find_single_match(data, r'<tr><td>(.+?)</td><tr>', -1)
|
||||
url_serie = scrapertools.find_single_match(data, r'<link rel="canonical" href="([^"]+)"\s?/>')
|
||||
goseries = support.typo("Vai alla Serie:", ' bold')
|
||||
series = support.typo(item.contentSerieName, ' bold color kod')
|
||||
itemlist = support.server(item, data=url_video)
|
||||
|
||||
itemlist.append(item.clone(title=goseries + series, contentType='tvshow', url=url_serie, action='episodios', plot = goseries + series + "con tutte le puntate", args=''))
|
||||
|
||||
return itemlist
|
||||
@@ -1,53 +0,0 @@
|
||||
{
|
||||
"id": "serietvsubita",
|
||||
"name": "Serie TV Sub ITA",
|
||||
"active": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "serietvsubita.png",
|
||||
"banner": "serietvsubita.png",
|
||||
"categories": ["tvshow"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi ricerca globale",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_series",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Serie TV",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "checklinks",
|
||||
"type": "bool",
|
||||
"label": "Verifica se i link esistono",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "checklinks_number",
|
||||
"type": "list",
|
||||
"label": "Numero de link da verificare",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "1", "3", "5", "10" ]
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostra link in lingua...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": ["Non filtrare","IT"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,351 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per Serietvsubita
|
||||
# Thanks to Icarus crew & Alfa addon & 4l3x87
|
||||
# ----------------------------------------------------------
|
||||
|
||||
import re
|
||||
import time
|
||||
|
||||
from core import httptools, tmdb, scrapertools, support
|
||||
from core.item import Item
|
||||
from core.support import info
|
||||
from platformcode import logger, config
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
info()
|
||||
itemlist = []
|
||||
tvshowSub = [
|
||||
('Novità {bold}',[ '', 'peliculas_tv', '', 'tvshow']),
|
||||
('Serie TV {bold}',[ '', 'lista_serie', '', 'tvshow']),
|
||||
('Per Lettera', ['', 'list_az', 'serie', 'tvshow'])
|
||||
]
|
||||
cerca = [(support.typo('Cerca...', 'bold'),[ '', 'search', '', 'tvshow'])]
|
||||
## support.aplay(item, itemlist, list_servers, list_quality)
|
||||
## support.channel_config(item, itemlist)
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def cleantitle(scrapedtitle):
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle.strip())
|
||||
scrapedtitle = scrapedtitle.replace('[HD]', '').replace('’', '\'').replace('×', 'x').replace('Game of Thrones –','')\
|
||||
.replace('In The Dark 2019', 'In The Dark (2019)').replace('"', "'").strip()
|
||||
year = scrapertools.find_single_match(scrapedtitle, r'\((\d{4})\)')
|
||||
if year:
|
||||
scrapedtitle = scrapedtitle.replace('(' + year + ')', '')
|
||||
|
||||
return scrapedtitle.strip()
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def findvideos(item):
|
||||
info()
|
||||
data = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True).data
|
||||
data = re.sub(r'\n|\t|\s+', ' ', data)
|
||||
# recupero il blocco contenente i link
|
||||
blocco = scrapertools.find_single_match(data, r'<div class="entry">([\s\S.]*?)<div class="post').replace('..:: Episodio ', 'Episodio ').strip()
|
||||
matches = scrapertools.find_multiple_matches(blocco, r'(S(\d*)E(\d*))\s')
|
||||
if len(matches) > 0:
|
||||
for fullseasonepisode, season, episode in matches:
|
||||
blocco = blocco.replace(fullseasonepisode + ' ', 'Episodio ' + episode + ' ')
|
||||
|
||||
blocco = blocco.replace('Episodio ', '..:: Episodio ')
|
||||
|
||||
episodio = item.infoLabels['episode']
|
||||
patron = r'\.\.:: Episodio %s([\s\S]*?)(<div class="post|..:: Episodio)' % episodio
|
||||
info(patron)
|
||||
info(blocco)
|
||||
|
||||
matches = scrapertools.find_multiple_matches(blocco, patron)
|
||||
if len(matches):
|
||||
data = matches[0][0]
|
||||
|
||||
patron = r'href="(https?://www\.keeplinks\.(?:co|eu)/p(?:[0-9]*)/([^"]+))"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for keeplinks, id in matches:
|
||||
headers2 = [['Cookie', 'flag[' + id + ']=1; defaults=1; nopopatall=' + str(int(time.time()))],
|
||||
['Referer', keeplinks]]
|
||||
|
||||
html = httptools.downloadpage(keeplinks, headers=headers2).data
|
||||
data += str(scrapertools.find_multiple_matches(html, '</lable><a href="([^"]+)" target="_blank"'))
|
||||
|
||||
return support.server(item, data=data)
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def lista_serie(item):
|
||||
info()
|
||||
itemlist = []
|
||||
|
||||
PERPAGE = 15
|
||||
|
||||
p = 1 if not item.args else int(item.args)
|
||||
|
||||
if '||' in item.data:
|
||||
series = item.data.split('\n\n')
|
||||
matches = []
|
||||
for i, serie in enumerate(series):
|
||||
matches.append(serie.split('||'))
|
||||
else:
|
||||
# Extrae las entradas
|
||||
patron = r'<li class="cat-item cat-item-\d+"><a href="([^"]+)"\s?>([^<]+)</a>'
|
||||
matches = support.match(item, patron=patron, headers=headers).matches
|
||||
for i, (scrapedurl, scrapedtitle) in enumerate(matches):
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
if (p - 1) * PERPAGE > i: continue
|
||||
if i >= p * PERPAGE: break
|
||||
title = cleantitle(scrapedtitle)
|
||||
itemlist.append(
|
||||
item.clone(action="episodios",
|
||||
title=title,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
fulltitle=title,
|
||||
show=title,
|
||||
plot=scrapedplot,
|
||||
contentType='episode',
|
||||
originalUrl=scrapedurl))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
# Paginazione
|
||||
if len(matches) >= p * PERPAGE:
|
||||
item.args = p + 1
|
||||
support.nextPage(itemlist, item, next_page=item.url)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def episodios(item, itemlist=[]):
|
||||
info()
|
||||
patron = r'<div class="post-meta">\s*<a href="([^"]+)"\s*title="([^"]+)"\s*class=".*?"></a>.*?'
|
||||
patron += r'<p><a href="([^"]+)">'
|
||||
|
||||
|
||||
html = support.match(item, patron=patron, headers=headers)
|
||||
matches = html.matches
|
||||
data = html.data
|
||||
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||
scrapedplot = ""
|
||||
scrapedtitle = cleantitle(scrapedtitle)
|
||||
if "(Completa)" in scrapedtitle:
|
||||
data = httptools.downloadpage(scrapedurl, headers=headers).data
|
||||
scrapedtitle = scrapedtitle.replace(" – Miniserie", " – Stagione 1")
|
||||
title = scrapedtitle.split(" – Stagione")[0].strip()
|
||||
|
||||
# recupero la stagione
|
||||
season = scrapertools.find_single_match(scrapedtitle, 'Stagione ([0-9]*)')
|
||||
blocco = scrapertools.find_single_match(data, r'<div class="entry">[\s\S.]*?<div class="post')
|
||||
blocco = blocco.replace('<strong>Episodio ', '<strong>Episodio ').replace(' </strong>', ' </strong>')
|
||||
blocco = blocco.replace('<strong>Episodio ', '<strong>S' + season.zfill(2) + 'E')
|
||||
matches = scrapertools.find_multiple_matches(blocco, r'(S(\d*)E(\d*))\s')
|
||||
episodes = []
|
||||
if len(matches) > 0:
|
||||
for fullepisode_s, season, episode in matches:
|
||||
season = season.lstrip("0")
|
||||
|
||||
episodes.append([
|
||||
"".join([season, "x", episode]),
|
||||
season,
|
||||
episode
|
||||
])
|
||||
|
||||
else:
|
||||
title = scrapedtitle.split(" S0")[0].strip()
|
||||
title = title.split(" S1")[0].strip()
|
||||
title = title.split(" S2")[0].strip()
|
||||
episodes = scrapertools.find_multiple_matches(scrapedtitle, r'((\d*)x(\d*))')
|
||||
|
||||
for fullepisode, season, episode in episodes:
|
||||
infoLabels = {}
|
||||
infoLabels['season'] = season
|
||||
infoLabels['episode'] = episode
|
||||
fullepisode += ' ' + support.typo("Sub-ITA", '_ [] color kod')
|
||||
itemlist.append(
|
||||
item.clone(action="findvideos",
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle,
|
||||
title=fullepisode,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
plot=scrapedplot,
|
||||
contentSerieName=title,
|
||||
infoLabels=infoLabels))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
# Paginazionazione
|
||||
patron = r'<strong class="on">\d+</strong>\s*<a href="([^<]+)">\d+</a>'
|
||||
next_page = scrapertools.find_single_match(data, patron)
|
||||
if next_page != "":
|
||||
item.url = next_page
|
||||
itemlist = episodios(item, itemlist)
|
||||
else:
|
||||
item.url = item.originalUrl
|
||||
support.videolibrary(itemlist, item, 'bold color kod')
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def peliculas_tv(item):
|
||||
info()
|
||||
itemlist = []
|
||||
|
||||
patron = r'<div class="post-meta">\s*<a href="([^"]+)"\s*title="([^"]+)"\s*class=".*?"></a>'
|
||||
|
||||
html = support.match(item, patron=patron, headers=headers)
|
||||
matches = html.matches
|
||||
data = html.data
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
if scrapedtitle in ["FACEBOOK", "RAPIDGATOR", "WELCOME!"]:
|
||||
continue
|
||||
|
||||
scrapedthumbnail = ""
|
||||
scrapedplot = ""
|
||||
scrapedtitle = cleantitle(scrapedtitle)
|
||||
infoLabels = {}
|
||||
episode = scrapertools.find_multiple_matches(scrapedtitle, r'((\d*)x(\d*))')
|
||||
if episode: # workaround per quando mettono le serie intere o altra roba, sarebbero da intercettare TODO
|
||||
episode = episode[0]
|
||||
title = scrapedtitle.split(" S0")[0].strip()
|
||||
title = title.split(" S1")[0].strip()
|
||||
title = title.split(" S2")[0].strip()
|
||||
|
||||
infoLabels['season'] = episode[1]
|
||||
infoLabels['episode'] = episode[2].zfill(2)
|
||||
|
||||
itemlist.append(
|
||||
item.clone(action="findvideos",
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle,
|
||||
title=title + " - " + episode[0] + " " + support.typo("Sub-ITA", '_ [] color kod'),
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
contentSerieName=title,
|
||||
contentLanguage='Sub-ITA',
|
||||
plot=scrapedplot,
|
||||
infoLabels=infoLabels))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
# Paginazione
|
||||
patron = r'<strong class="on">\d+</strong>\s?<a href="([^<]+)">\d+</a>'
|
||||
support.nextPage(itemlist, item, data, patron)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def newest(categoria):
|
||||
info(categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
item.url = host
|
||||
item.extra = 'serie'
|
||||
try:
|
||||
if categoria == "series":
|
||||
itemlist = peliculas_tv(item)
|
||||
if itemlist[-1].action == 'peliculas_tv':
|
||||
itemlist.pop(-1)
|
||||
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def search(item, texto):
|
||||
info(texto)
|
||||
itemlist = []
|
||||
try:
|
||||
patron = r'<li class="cat-item cat-item-\d+"><a href="([^"]+)"\s?>([^<]+)</a>'
|
||||
matches = support.match(item, patron=patron, headers=headers).matches
|
||||
for i, (scrapedurl, scrapedtitle) in enumerate(matches):
|
||||
if texto.upper() in scrapedtitle.upper():
|
||||
scrapedthumbnail = ""
|
||||
scrapedplot = ""
|
||||
title = cleantitle(scrapedtitle)
|
||||
itemlist.append(
|
||||
item.clone(action="episodios",
|
||||
title=title,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
fulltitle=title,
|
||||
show=title,
|
||||
plot=scrapedplot,
|
||||
contentType='episode',
|
||||
originalUrl=scrapedurl))
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.info('search log:', line)
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
def list_az(item):
|
||||
info()
|
||||
itemlist = []
|
||||
|
||||
alphabet = dict()
|
||||
patron = r'<li class="cat-item cat-item-\d+"><a href="([^"]+)"\s?>([^<]+)</a>'
|
||||
matches = support.match(item, patron=patron, headers=headers).matches
|
||||
for i, (scrapedurl, scrapedtitle) in enumerate(matches):
|
||||
letter = scrapedtitle[0].upper()
|
||||
if letter not in alphabet:
|
||||
alphabet[letter] = []
|
||||
alphabet[letter].append(scrapedurl + '||' + scrapedtitle)
|
||||
|
||||
for letter in sorted(alphabet):
|
||||
itemlist.append(
|
||||
item.clone(action="lista_serie",
|
||||
data='\n\n'.join(alphabet[letter]),
|
||||
title=letter,
|
||||
fulltitle=letter,
|
||||
args=''))
|
||||
|
||||
return itemlist
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "serietvu",
|
||||
"name": "SerieTVU",
|
||||
"active": true,
|
||||
"active": false,
|
||||
"language": ["ita", "sub-ita"],
|
||||
"thumbnail": "serietvu.png",
|
||||
"banner": "serietvu.png",
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"id": "streamingaltadefinizione",
|
||||
"name": "Popcorn Stream",
|
||||
"language": ["ita"],
|
||||
"active": false,
|
||||
"thumbnail": "popcornstream.png",
|
||||
"banner": "popcornstream.png",
|
||||
"categories": ["movie","tvshow","anime"],
|
||||
"not_active":["include_in_newest_peliculas", "include_in_newest_series", "include_in_newest_anime"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per Popcorn Stream
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support, httptools
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
import sys
|
||||
if sys.version_info[0] >= 3:
|
||||
from urllib.parse import unquote
|
||||
else:
|
||||
from urllib import unquote
|
||||
|
||||
|
||||
def findhost(url):
|
||||
data = httptools.downloadpage(url).data
|
||||
return support.scrapertools.find_single_match(data, '<a href="([^"]+)')
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = ["/film/"]
|
||||
anime = ["/genere/anime/"]
|
||||
tvshow = ["/serietv/"]
|
||||
top = [('Generi',['', 'genre'])]
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.info("[streamingaltadefinizione.py] " + item.url + " search " + text)
|
||||
item.url = item.url + "/?s=" + text
|
||||
try:
|
||||
return support.dooplay_search(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genre(item):
|
||||
patronMenu = '<a href="(?P<url>[^"#]+)">(?P<title>[a-zA-Z]+)'
|
||||
patronBlock='<a href="#">Genere</a><ul class="sub-menu">(?P<block>.*?)</ul>'
|
||||
action='peliculas'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
return support.dooplay_peliculas(item, True if "/genere/" in item.url else False)
|
||||
|
||||
|
||||
def episodios(item):
|
||||
return support.dooplay_get_episodes(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
matches = support.match(item, patron=r'<a href="([^"]+)[^>]+>Download[^>]+>[^>]+>[^>]+><strong class="quality">([^<]+)<').matches
|
||||
for url, quality in matches:
|
||||
itemlist.append(
|
||||
item.clone(caction="play",
|
||||
url=unquote(support.match(url, patron=[r'dest=([^"]+)"',r'/(http[^"]+)">Click']).match),
|
||||
quality=quality))
|
||||
|
||||
return support.server(item, itemlist=itemlist)
|
||||
+111
-62
@@ -2,30 +2,43 @@
|
||||
# ------------------------------------------------------------
|
||||
# Canale per StreamingCommunity
|
||||
# ------------------------------------------------------------
|
||||
import functools
|
||||
import json, requests, re, sys
|
||||
from core import support, channeltools, httptools, jsontools, filetools
|
||||
from platformcode import logger, config, platformtools
|
||||
|
||||
import json, requests, sys
|
||||
from core import support, channeltools
|
||||
from platformcode import logger
|
||||
if sys.version_info[0] >= 3:
|
||||
from concurrent import futures
|
||||
else:
|
||||
from concurrent_py2 import futures
|
||||
|
||||
# def findhost(url):
|
||||
# return 'https://' + support.match(url, patron='var domain\s*=\s*"([^"]+)').match
|
||||
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
session = requests.Session()
|
||||
headers = {}
|
||||
|
||||
def getHeaders():
|
||||
|
||||
def getHeaders(forced=False):
|
||||
global headers
|
||||
global host
|
||||
if not headers:
|
||||
# try:
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14'}
|
||||
response = session.get(host, headers=headers)
|
||||
csrf_token = support.match(response.text, patron='name="csrf-token" content="([^"]+)"').match
|
||||
response = httptools.downloadpage(host, headers=headers)
|
||||
# if not response.url.startswith(host):
|
||||
# host = support.config.get_channel_url(findhost, forceFindhost=True)
|
||||
csrf_token = support.match(response.data, patron='name="csrf-token" content="([^"]+)"').match
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14',
|
||||
'content-type': 'application/json;charset=UTF-8',
|
||||
'Referer': host,
|
||||
'x-csrf-token': csrf_token,
|
||||
'Cookie': '; '.join([x.name + '=' + x.value for x in response.cookies])}
|
||||
# except:
|
||||
# host = support.config.get_channel_url(findhost, forceFindhost=True)
|
||||
# if not forced: getHeaders(True)
|
||||
|
||||
getHeaders()
|
||||
|
||||
@support.menu
|
||||
@@ -75,9 +88,12 @@ def newest(category):
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
item.args = 1
|
||||
item.newest = True
|
||||
if category == 'peliculas':
|
||||
item.contentType = 'movie'
|
||||
item.url = host + '/film'
|
||||
else:
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host + '/serie-tv'
|
||||
|
||||
try:
|
||||
@@ -97,25 +113,29 @@ def newest(category):
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
# getHeaders()
|
||||
logger.debug()
|
||||
if item.mainThumb: item.thumbnail = item.mainThumb
|
||||
global host
|
||||
itemlist = []
|
||||
items = []
|
||||
recordlist = []
|
||||
videoType = 'movie' if item.contentType == 'movie' else 'tv'
|
||||
|
||||
page = item.page if item.page else 0
|
||||
offset = page * 60
|
||||
|
||||
if item.records:
|
||||
records = item.records
|
||||
elif type(item.args) == int:
|
||||
data = support.scrapertools.decodeHtmlentities(support.match(item).data)
|
||||
records = json.loads(support.match(data, patron=r'slider-title titles-json="(.*?)" slider-name="').matches[item.args])
|
||||
records = json.loads(support.match(data, patron=r'slider-title titles-json="(.*?)"\s*slider-name="').matches[item.args])
|
||||
elif not item.search:
|
||||
payload = json.dumps({'type': videoType, 'offset':offset, 'genre':item.args})
|
||||
records = session.post(host + '/api/browse', headers=headers, data=payload).json()['records']
|
||||
records = httptools.downloadpage(host + '/api/browse', headers=headers, post=payload).json['records']
|
||||
else:
|
||||
payload = json.dumps({'q': item.search})
|
||||
records = session.post(host + '/api/search', headers=headers, data=payload).json()['records']
|
||||
records = httptools.downloadpage(host + '/api/search', headers=headers, post=payload).json['records']
|
||||
|
||||
|
||||
if records and type(records[0]) == list:
|
||||
js = []
|
||||
@@ -126,23 +146,34 @@ def peliculas(item):
|
||||
|
||||
for i, it in enumerate(js):
|
||||
if i < 20:
|
||||
itemlist.append(makeItem(i, it, item))
|
||||
items.append(it)
|
||||
else:
|
||||
recordlist.append(it)
|
||||
|
||||
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
itlist = [executor.submit(makeItem, i, it, item) for i, it in enumerate(items)]
|
||||
for res in futures.as_completed(itlist):
|
||||
if res.result():
|
||||
itemlist.append(res.result())
|
||||
|
||||
itemlist.sort(key=lambda item: item.n)
|
||||
if recordlist:
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), page=page, records=recordlist))
|
||||
elif len(itemlist) >= 20:
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), records=[], page=page + 1))
|
||||
if not item.newest:
|
||||
item.mainThumb = item.thumbnail
|
||||
if recordlist:
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), page=page, records=recordlist))
|
||||
elif len(itemlist) >= 20:
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), records=[], page=page + 1))
|
||||
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
support.check_trakt(itemlist)
|
||||
return itemlist
|
||||
|
||||
def makeItem(n, it, item):
|
||||
info = session.post(host + '/api/titles/preview/{}'.format(it['id']), headers=headers).json()
|
||||
title, lang = support.match(info['name'], patron=r'([^\[|$]+)(?:\[([^\]]+)\])?').match
|
||||
if not lang:
|
||||
lang = 'ITA'
|
||||
info = httptools.downloadpage(host + '/api/titles/preview/{}'.format(it['id']), headers=headers, post={}).json
|
||||
logger.debug(it)
|
||||
title = info['name']
|
||||
lang = 'Sub-ITA' if 'sub-ita' in title.lower() else 'ITA'
|
||||
title = support.cleantitle(re.sub('\[|\]|[Ss][Uu][Bb]-[Ii][Tt][Aa]', '', title))
|
||||
itm = item.clone(title=support.typo(title,'bold') + support.typo(lang,'_ [] color kod bold'))
|
||||
itm.contentType = info['type'].replace('tv', 'tvshow')
|
||||
itm.language = lang
|
||||
@@ -152,7 +183,6 @@ def makeItem(n, it, item):
|
||||
if itm.contentType == 'movie':
|
||||
# itm.contentType = 'movie'
|
||||
itm.fulltitle = itm.show = itm.contentTitle = title
|
||||
itm.contentTitle = ''
|
||||
itm.action = 'findvideos'
|
||||
itm.url = host + '/watch/%s' % it['id']
|
||||
|
||||
@@ -174,55 +204,74 @@ def episodios(item):
|
||||
js = json.loads(support.match(item.url, patron=r'seasons="([^"]+)').match.replace('"','"'))
|
||||
|
||||
for episodes in js:
|
||||
# logger.debug(jsontools.dump(js))
|
||||
for it in episodes['episodes']:
|
||||
itemlist.append(
|
||||
support.Item(channel=item.channel,
|
||||
title=support.typo(str(episodes['number']) + 'x' + str(it['number']).zfill(2) + ' - ' + it['name'], 'bold'),
|
||||
episode = it['number'],
|
||||
season=episodes['number'],
|
||||
thumbnail=it['images'][0]['original_url'] if 'images' in it and 'original_url' in it['images'][0] else item.thumbnail,
|
||||
fanart=item.fanart,
|
||||
plot=it['plot'],
|
||||
action='findvideos',
|
||||
contentType='episode',
|
||||
contentSerieName=item.fulltitle,
|
||||
url=host + '/watch/' + str(episodes['title_id']),
|
||||
episodeid= '?e=' + str(it['id'])))
|
||||
|
||||
itemlist.append(
|
||||
item.clone(title=support.typo(str(episodes['number']) + 'x' + str(it['number']).zfill(2) + ' - ' + support.cleantitle(it['name']), 'bold'),
|
||||
episode=it['number'],
|
||||
season=episodes['number'],
|
||||
contentSeason=episodes['number'],
|
||||
contentEpisodeNumber=it['number'],
|
||||
thumbnail=it['images'][0].get('original_url', item.thumbnail) if it['images'] else item.thumbnail,
|
||||
contentThumbnail=item.thumbnail,
|
||||
fanart=item.fanart,
|
||||
contentFanart=item.fanart,
|
||||
plot=it['plot'],
|
||||
action='findvideos',
|
||||
contentType='episode',
|
||||
contentSerieName=item.fulltitle,
|
||||
url=host + '/watch/' + str(episodes['title_id']) + '?e=' + str(it['id'])))
|
||||
|
||||
if config.get_setting('episode_info') and not support.stackCheck(['add_tvshow', 'get_newest']):
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
support.check_trakt(itemlist)
|
||||
support.videolibrary(itemlist, item)
|
||||
support.download(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
video_urls = []
|
||||
data = support.match(item.url + item.episodeid, headers=headers).data.replace('"','"').replace('\\','')
|
||||
url = support.match(data, patron=r'video_url"\s*:\s*"([^"]+)"').match
|
||||
itemlist = [item.clone(title = channeltools.get_channel_parameters(item.channel)['title'], url=item.url, server='streamingcommunityws')]
|
||||
return support.server(item, itemlist=itemlist, referer=False)
|
||||
|
||||
def calculateToken():
|
||||
from time import time
|
||||
from base64 import b64encode as b64
|
||||
import hashlib
|
||||
o = 48
|
||||
n = support.match(host + '/client-address').data
|
||||
i = 'Yc8U6r8KjAKAepEA'
|
||||
t = int(time() + (3600 * o))
|
||||
l = '{}{} {}'.format(t, n, i)
|
||||
md5 = hashlib.md5(l.encode())
|
||||
s = '?token={}&expires={}'.format(b64(md5.digest()).decode().replace('=', '').replace('+', "-").replace('\\', "_"), t)
|
||||
return s
|
||||
token = calculateToken()
|
||||
# def play(item):
|
||||
# from time import time
|
||||
# from base64 import b64encode
|
||||
# from hashlib import md5
|
||||
|
||||
def videourls(res):
|
||||
newurl = '{}/{}{}'.format(url, res, token)
|
||||
if requests.head(newurl, headers=headers).status_code == 200:
|
||||
video_urls.append(["m3u8 {} [StreamingCommunity]".format(res), newurl])
|
||||
# data = support.httptools.downloadpage(item.url + item.episodeid, headers=headers).data.replace('"','"').replace('\\','')
|
||||
# scws_id = support.match(data, patron=r'scws_id"\s*:\s*(\d+)').match
|
||||
# # support.dbg()
|
||||
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
for res in ['480p', '720p', '1080p']:
|
||||
executor.submit(videourls, res)
|
||||
# if not scws_id:
|
||||
# if '<strong>Prossimamente' in data:
|
||||
# platformtools.dialog_ok('StreamingCommunity', 'Il sito notifica che il contenuto sarà disponibile prossimamente')
|
||||
# platformtools.play_canceled = True
|
||||
# return []
|
||||
|
||||
if not video_urls: video_urls = [["m3u8 [StreamingCommunity]", url + token]]
|
||||
else: video_urls.sort(key=lambda url: int(support.match(url[0], patron=r'(\d+)p').match))
|
||||
itemlist = [item.clone(title = channeltools.get_channel_parameters(item.channel)['title'], server='directo', video_urls=video_urls, thumbnail=channeltools.get_channel_parameters(item.channel)["thumbnail"], forcethumb=True)]
|
||||
return support.server(item, itemlist=itemlist)
|
||||
# # Calculate Token
|
||||
# # client_ip = support.httptools.downloadpage('https://scws.work/videos/{}'.format(scws_id)).json.get('client_ip')
|
||||
# client_ip = support.httptools.downloadpage('http://ip-api.com/json/').json.get('query')
|
||||
|
||||
# expires = int(time() + 172800)
|
||||
# token = b64encode(md5('{}{} Yc8U6r8KjAKAepEA'.format(expires, client_ip).encode('utf-8')).digest()).decode('utf-8').replace('=', '').replace('+', '-').replace('/', '_')
|
||||
|
||||
# url = 'https://scws.work/master/{}?token={}&expires={}&n=1'.format(scws_id, token, expires)
|
||||
# subs = []
|
||||
# urls = []
|
||||
|
||||
# info = support.match(url, patron=r'LANGUAGE="([^"]+)",\s*URI="([^"]+)|RESOLUTION=\d+x(\d+).*?(http[^"\s]+)', headers=headers).matches
|
||||
# if info:
|
||||
# for lang, sub, res, url in info:
|
||||
# if sub and not logger.testMode: # ai test non piace questa parte
|
||||
# if lang == 'auto': lang = 'ita-forced'
|
||||
# s = config.get_temp_file(lang +'.srt')
|
||||
# subs.append(s)
|
||||
# filetools.write(s, support.vttToSrt(httptools.downloadpage(support.match(sub, patron=r'(http[^\s\n]+)').match).data))
|
||||
# elif url:
|
||||
# urls.append(['hls [{}]'.format(res), url])
|
||||
|
||||
# return [item.clone(title = channeltools.get_channel_parameters(item.channel)['title'], server='stt', video_urls=urls, subtitle=subs, manifest='hls', referer=False)]
|
||||
# else:
|
||||
# return [item.clone(title = channeltools.get_channel_parameters(item.channel)['title'], server='directo', url=url, manifest='hls', referer=False)]
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "streamingita",
|
||||
"name": "StreamingITA",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"thumbnail": "streamingita.png",
|
||||
"banner": "streamingita.png",
|
||||
"categories": ["tvshow", "movie"],
|
||||
"not_active": ["include_in_newest_peliculas", "include_in_newest_anime", "include_in_newest_series"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per streamingITA
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import httptools, support
|
||||
from platformcode import logger, config
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = ['/film']
|
||||
top = [('Generi', ['/film', 'menu', 'genres']),
|
||||
('Anno', ['/film', 'menu', 'releases'])]
|
||||
tvshow = ['/tv']
|
||||
search = ''
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.info('search', text)
|
||||
item.url = item.url + "/?s=" + text
|
||||
try:
|
||||
return support.dooplay_search(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
mixed = True if item.contentType == 'undefined' else False
|
||||
return support.dooplay_peliculas(item, mixed)
|
||||
|
||||
|
||||
def episodios(item):
|
||||
itemlist = support.dooplay_get_episodes(item)
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
data = []
|
||||
for link in support.dooplay_get_links(item, host):
|
||||
url = httptools.downloadpage(link['url'], only_headers=True, headers=headers).url
|
||||
data.append(url)
|
||||
return support.server(item, data)
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
action = 'peliculas'
|
||||
item.contentType = 'undefined'
|
||||
if item.args in ['genres', 'releases']:
|
||||
patronBlock = r'<nav class="' + item.args + r'">(?P<block>.*?)</nav'
|
||||
patronMenu= r'<a href="(?P<url>[^"]+)"[^>]*>(?P<title>[^<]+)<'
|
||||
else:
|
||||
patronBlock = r'class="main-header">(?P<block>.*?)headitems'
|
||||
patronMenu = r'(?P<url>' + host + r'quality/[^/]+/\?post_type=movies)">(?P<title>[^<]+)'
|
||||
return locals()
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"id": "tantifilm",
|
||||
"name": "Tantifilm",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"thumbnail": "tantifilm.png",
|
||||
"banner": "tantifilm.png",
|
||||
"id": "tantifilm",
|
||||
"name": "Tantifilm",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"thumbnail": "tantifilm.png",
|
||||
"banner": "tantifilm.png",
|
||||
"categories": ["tvshow", "movie", "anime"],
|
||||
"not_active":["include_in_newest_anime", "include_in_newest_peliculas"],
|
||||
"not_active": ["include_in_newest_anime", "include_in_newest_peliculas"],
|
||||
"settings": []
|
||||
}
|
||||
}
|
||||
+118
-146
@@ -3,19 +3,12 @@
|
||||
# Canale per Tantifilm
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import scrapertools, httptools, support
|
||||
from core import support
|
||||
from core.item import Item
|
||||
from core.support import info
|
||||
from platformcode import logger
|
||||
from platformcode import config
|
||||
|
||||
|
||||
# def findhost(url):
|
||||
# permUrl = httptools.downloadpage(url).data
|
||||
# host = scrapertools.find_single_match(permUrl, r'<a href="([^"]+)')
|
||||
# return host
|
||||
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@@ -23,90 +16,32 @@ player_iframe = r'<iframe.*?src="([^"]+)"[^>]+></iframe>\s*<div class="player'
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
info()
|
||||
logger.debug()
|
||||
|
||||
top = [('Generi', ['', 'genres'])]
|
||||
|
||||
top = [('Generi', ['', 'category'])]
|
||||
film = ['/film',
|
||||
('Al Cinema', ['/watch-genre/al-cinema/']),
|
||||
('HD', ['/watch-genre/altadefinizione/']),
|
||||
('Sub-ITA', ['/watch-genre/sub-ita/'])
|
||||
|
||||
]
|
||||
('Al Cinema', ['/watch-genre/al-cinema/']),
|
||||
('HD', ['/watch-genre/altadefinizione/']),
|
||||
('Sub-ITA', ['/watch-genre/sub-ita/'])]
|
||||
|
||||
tvshow = ['/serie-tv/',
|
||||
('HD', ['/watch-genre/serie-altadefinizione/']),
|
||||
('Miniserie', ['/watch-genre/miniserie-1/']),
|
||||
('Programmi TV', ['/watch-genre/programmi-tv/']),
|
||||
#('LIVE', ['/watch-genre/live/'])
|
||||
]
|
||||
('Programmi TV', ['/watch-genre/programmi-tv/'])]
|
||||
|
||||
anime = ['/watch-genre/anime/'
|
||||
]
|
||||
anime = ['/watch-genre/anime/']
|
||||
|
||||
search = ''
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
# debug = True
|
||||
if item.args == 'search':
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="Permalink to\s*(?P<title>[^"]+) \((?P<year>[0-9]+)[^<]*\)[^"]*"[^>]+>\s*<img[^s]+src="(?P<thumb>[^"]+)".*?<div class="calitate">\s*<p>(?P<quality>[^<]+)<\/p>'
|
||||
else:
|
||||
patronNext = r'<a class="nextpostslink" rel="next" href="([^"]+)">'
|
||||
patron = r'<div class="mediaWrap mediaWrapAlt">\s*<a href="(?P<url>[^"]+)"(?:[^>]+)?>?\s*(?:<img[^s]+src="(?P<thumb>[^"]+)"[^>]+>\s*)?<\/a>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+?)(?P<lang>[sS][uU][bB]\-[iI][tT][aA]+)?(?:[ ]?\((?P<year>\d{4})-?(?:\d{4})?)\).[^<]+[^>]+><\/a>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<quality>[a-zA-Z-0-9\.]+)?'
|
||||
patronBlock = r'<div id="main_col">(?P<block>.*?)<!\-\- main_col \-\->'
|
||||
|
||||
# if item.args != 'all' and item.args != 'search':
|
||||
# action = 'findvideos' if item.extra == 'movie' else 'episodios'
|
||||
# item.contentType = 'movie' if item.extra == 'movie' else 'tvshow'
|
||||
# debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
def get_season(pageData, seas_url, season):
|
||||
data = ''
|
||||
episodes = support.match(pageData if pageData else seas_url, patronBlock=patron_episode, patron=patron_option).matches
|
||||
for episode_url, episode in episodes:
|
||||
title = season + "x" + episode.zfill(2) + ' - ' + item.fulltitle
|
||||
data += title + '|' + episode_url + '\n'
|
||||
return data
|
||||
|
||||
patron_season = 'Stagioni<\/a>.*?<ul class="nav navbar-nav">(.*?)<\/ul>'
|
||||
patron_episode = 'Episodio<\/a>.*?<ul class="nav navbar-nav">(?P<block>.*?)<\/ul>'
|
||||
patron_option = r'<a href="([^"]+?)".*?>[^>]+></i>\s*(\d+)'
|
||||
|
||||
url = support.match(item, patron=player_iframe).match
|
||||
seasons = support.match(url, patronBlock=patron_season, patron=patron_option)
|
||||
|
||||
data = ''
|
||||
|
||||
import sys
|
||||
if sys.version_info[0] >= 3: from concurrent import futures
|
||||
else: from concurrent_py2 import futures
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
thL = []
|
||||
for i, season in enumerate(seasons.matches):
|
||||
thL.append(executor.submit(get_season, seasons.data if i == 0 else '', season[0], season[1]))
|
||||
for res in futures.as_completed(thL):
|
||||
if res.result():
|
||||
data += res.result()
|
||||
patron = r'(?P<season>\d+)x(?P<episode>\d+)\s*-\s*(?P<title>[^\|]+)\|(?P<url>[^ ]+)'
|
||||
action = 'findvideos'
|
||||
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.sort(key=lambda item: (item.infoLabels['season'], item.infoLabels['episode']))
|
||||
return itemlist
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def category(item):
|
||||
def genres(item):
|
||||
|
||||
blacklist = ['Ultimi Film Aggiornati', 'Anime', 'Serie TV Altadefinizione', 'HD AltaDefinizione', 'Al Cinema', 'Serie TV', 'Miniserie', 'Programmi Tv', 'Live', 'Trailers', 'Serie TV Aggiornate', 'Aggiornamenti', 'Featured']
|
||||
patron = '<li><a href="(?P<url>[^"]+)"><span></span>(?P<title>[^<]+)</a></li>'
|
||||
patronMenu = '<li><a href="(?P<url>[^"]+)"><span></span>(?P<title>[^<]+)</a></li>'
|
||||
patron_block = '<ul class="table-list">(.*?)</ul>'
|
||||
action = 'peliculas'
|
||||
|
||||
@@ -114,8 +49,7 @@ def category(item):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
info(texto)
|
||||
|
||||
logger.debug(texto)
|
||||
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
@@ -136,12 +70,115 @@ def newest(categoria):
|
||||
item = Item(url=host + '/aggiornamenti-serie-tv')
|
||||
data = support.match(item).data.replace('<u>','').replace('</u>','')
|
||||
item.contentType = 'episode'
|
||||
patronBlock = r'Aggiornamenti Giornalieri Serie TV.*?<div class="sp-body folded">(?P<block>.*?)</div>'
|
||||
patronBlock = r'Aggiornamenti (?:Giornalieri )?Serie TV.*?<div class="sp-body folded">(?P<block>.*?)</div>'
|
||||
patron = r'<p>(?P<title>.*?)\((?P<year>[0-9]{4})[^\)]*\)[^<]+<a href="(?P<url>[^"]+)">(?P<episode>[^ ]+) (?P<lang>[Ss][Uu][Bb].[Ii][Tt][Aa])?(?P<title2>[^<]+)?'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
action = 'check'
|
||||
item.contentType = 'undefined'
|
||||
if item.args == 'search':
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="Permalink to\s*(?P<title>[^"]+) \((?P<year>[0-9]+)[^<]*\)[^"]*"[^>]+>\s*<img[^s]+src="(?P<thumb>[^"]+)".*?<div class="calitate">\s*<p>(?P<quality>[^<]+)<\/p>'
|
||||
else:
|
||||
patronNext = r'<a class="nextpostslink" rel="next" href="([^"]+)">'
|
||||
patron = r'<div class="mediaWrap mediaWrapAlt">\s*<a href="(?P<url>[^"]+)"(?:[^>]+)?>?\s*(?:<img[^s]+src="(?P<thumb>[^"]+)"[^>]+>\s*)?<\/a>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+?)(?P<lang>[sS][uU][bB]\-[iI][tT][aA]+)?(?:[ ]?\((?P<year>\d{4})-?(?:\d{4})?)\).[^<]+[^>]+><\/a>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<quality>[a-zA-Z-0-9\.]+)?'
|
||||
patronBlock = r'<div id="main_col">(?P<block>.*?)<!\-\- main_col \-\->'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
def get_season(pageData, seas_url, season):
|
||||
data = ''
|
||||
episodes = support.match(pageData if pageData else seas_url, patronBlock=patron_episode, patron=patron_option).matches
|
||||
for episode_url, episode in episodes:
|
||||
title = season + "x" + episode.zfill(2) + ' - ' + item.fulltitle
|
||||
data += title + '|' + episode_url + '\n'
|
||||
return data
|
||||
|
||||
patron_season = 'Stagioni<\/a>.*?<ul class="nav navbar-nav">(.*?)<\/ul>'
|
||||
patron_episode = 'Episodio<\/a>.*?<ul class="nav navbar-nav">(?P<block>.*?)<\/ul>'
|
||||
patron_option = r'<a href="([^"]+?)".*?>[^>]+></i>\s*(\d+)'
|
||||
|
||||
if item.data:
|
||||
url = support.match(item.data, patron=player_iframe).match
|
||||
item.data = ''
|
||||
else:
|
||||
url = support.match(item, patron=player_iframe).match
|
||||
seasons = support.match(url, patronBlock=patron_season, patron=patron_option)
|
||||
|
||||
data = ''
|
||||
|
||||
import sys
|
||||
if sys.version_info[0] >= 3: from concurrent import futures
|
||||
else: from concurrent_py2 import futures
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
thL = []
|
||||
for i, season in enumerate(seasons.matches):
|
||||
thL.append(executor.submit(get_season, '', season[0], season[1]))
|
||||
for res in futures.as_completed(thL):
|
||||
if res.result():
|
||||
data += res.result()
|
||||
patron = r'(?P<season>\d+)x(?P<episode>\d+)\s*-\s*(?P<title>[^\|]+)\|(?P<url>[^ ]+)'
|
||||
# debug = True
|
||||
action = 'findvideos'
|
||||
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.sort(key=lambda item: (item.infoLabels['season'], item.infoLabels['episode']))
|
||||
return itemlist
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def check(item):
|
||||
item.data = support.match(item.url, headers=headers).data
|
||||
check = support.match(item.data, patron=r'<div class="category-film">(.*?)</div>').match
|
||||
if 'sub' in check.lower():
|
||||
item.contentLanguage = 'Sub-ITA'
|
||||
logger.debug("CHECK : ", check)
|
||||
# if 'anime' in check.lower():
|
||||
# item.contentType = 'tvshow'
|
||||
# logger.debug('select = ### è una anime ###')
|
||||
# try:
|
||||
# return episodios(item)
|
||||
# except:
|
||||
# pass
|
||||
if 'serie' in check.lower():
|
||||
item.contentType = 'tvshow'
|
||||
return episodios(item)
|
||||
else:
|
||||
item.contentTitle = item.fulltitle
|
||||
item.contentType = 'movie'
|
||||
return findvideos(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.debug()
|
||||
data = item.data if item.data else support.match(item.url, headers=headers).data
|
||||
itemlist = []
|
||||
|
||||
if '/serietv/series/names' in item.url:
|
||||
itemlist.extend(support.server(item, itemlist=hdpass(Item(url=item.url))))
|
||||
else:
|
||||
urls = support.match(data, patron=player_iframe).matches
|
||||
if item.otherLinks:
|
||||
urls += support.match(item.otherLinks, patron=r'href="([^"]+)').matches
|
||||
|
||||
logger.debug('URLS', urls)
|
||||
for u in urls:
|
||||
if 'hdplayer.casa/series/' in u:
|
||||
urls.remove(u)
|
||||
itemlist.extend(support.server(item, itemlist=hdpass(Item(url=u))))
|
||||
break
|
||||
else:
|
||||
itemlist.extend(support.server(item, urls))
|
||||
support.addQualityTag(item, itemlist, data, 'Keywords:\s*(?:<span>)?([^<]+)')
|
||||
return itemlist
|
||||
|
||||
|
||||
@support.scrape
|
||||
def hdpass(item):
|
||||
patronBlock = r'<ul class="nav navbar-nav">(?P<block>.*?)</ul>'
|
||||
@@ -151,69 +188,4 @@ def hdpass(item):
|
||||
url = support.match(item.url, patron='<iframe.*?src="([^"]+)').match
|
||||
return Item(url=url)
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
info()
|
||||
support.info("ITEMLIST: ", item)
|
||||
data = support.match(item.url, headers=headers).data
|
||||
check = support.match(data, patron=r'<div class="category-film">(.*?)</div>').match
|
||||
if 'sub' in check.lower():
|
||||
item.contentLanguage = 'Sub-ITA'
|
||||
support.info("CHECK : ", check)
|
||||
if 'anime' in check.lower():
|
||||
item.contentType = 'tvshow'
|
||||
item.data = data
|
||||
support.info('select = ### è una anime ###')
|
||||
try:
|
||||
return episodios(item)
|
||||
except:
|
||||
pass
|
||||
elif 'serie' in check.lower():
|
||||
item.contentType = 'tvshow'
|
||||
item.data = data
|
||||
return episodios(item)
|
||||
else:
|
||||
item.contentTitle = item.fulltitle
|
||||
item.contentType = 'movie'
|
||||
|
||||
# if 'protectlink' in data:
|
||||
# urls = scrapertools.find_multiple_matches(data, r'<iframe src="[^=]+=(.*?)"')
|
||||
# support.info("SONO QUI: ", urls)
|
||||
# for url in urls:
|
||||
# url = url.decode('base64')
|
||||
# # tiro via l'ultimo carattere perchè non c'entra
|
||||
# url, c = unshorten_only(url)
|
||||
# if 'nodmca' in url:
|
||||
# page = httptools.downloadpage(url, headers=headers).data
|
||||
# url = '\t' + scrapertools.find_single_match(page, '<meta name="og:url" content="([^=]+)">')
|
||||
# if url:
|
||||
# listurl.add(url)
|
||||
# data += '\n'.join(listurl)
|
||||
info(data)
|
||||
itemlist = []
|
||||
# support.dbg()
|
||||
|
||||
if '/serietv/series/names' in item.url:
|
||||
itemlist.extend(support.server(item, itemlist=hdpass(Item(url=item.url))))
|
||||
else:
|
||||
urls = support.match(data, patron=player_iframe).matches
|
||||
# support.dbg()
|
||||
if item.otherLinks:
|
||||
urls += support.match(item.otherLinks, patron=r'href="([^"]+)').matches
|
||||
|
||||
info('URLS', urls)
|
||||
for u in urls:
|
||||
if 'hdplayer.casa/series/' in u:
|
||||
urls.remove(u)
|
||||
itemlist.extend(support.server(item, itemlist=hdpass(Item(url=u))))
|
||||
break
|
||||
if 'protectlink.stream' in u:
|
||||
import base64
|
||||
urls.remove(u)
|
||||
urls.append(base64.b64decode(u.split('?data=')[1]))
|
||||
else:
|
||||
itemlist.extend(support.server(item, urls))
|
||||
support.addQualityTag(item, itemlist, data, 'Keywords:\s*(?:<span>)?([^<]+)')
|
||||
return itemlist
|
||||
return locals()
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"id": "tapmovie",
|
||||
"name": "Tap Movie",
|
||||
"language": ["ita", "sub-ita"],
|
||||
"active": true,
|
||||
"thumbnail": "tapmovie.png",
|
||||
"banner": "tapmovie.png",
|
||||
"categories": ["movie", "tvshow", "anime"],
|
||||
"not_active": ["include_in_newest"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per 'dvdita'
|
||||
|
||||
from core import support, httptools
|
||||
from core.item import Item
|
||||
import sys
|
||||
if sys.version_info[0] >= 3: from concurrent import futures
|
||||
else: from concurrent_py2 import futures
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
api_url = '/api/v2/'
|
||||
per_page = 24
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
film = ['/browse/movie']
|
||||
tvshow = ['/browse/tvshow']
|
||||
search = ''
|
||||
|
||||
# [Voce Menu,['url','action','args',contentType]
|
||||
top = [('Generi', ['', 'genres', '', 'undefined'])]
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def episodios(item):
|
||||
support.info(item)
|
||||
itemlist = []
|
||||
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
thL = []
|
||||
for season in httptools.downloadpage(host + api_url + 'tvshow', post={'tvshow_id': item.id}).json.get('season', []):
|
||||
season_id = season['season_number']
|
||||
thL.append(executor.submit(httptools.downloadpage, host + api_url + 'episodes', post={'tvshow_id': item.id, 'season_id': season_id}))
|
||||
for th in futures.as_completed(thL):
|
||||
for episode in th.result().json.get('episodes', []):
|
||||
itemlist.append(item.clone(action="findvideos", contentSeason=episode['season_id'], contentEpisodeNumber=episode['episode_number'], id=item.id,
|
||||
title=episode['season_id']+'x'+episode['episode_number'], contentType='episode'))
|
||||
support.scraper.sort_episode_list(itemlist)
|
||||
support.videolibrary(itemlist, item)
|
||||
support.download(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def genres(item):
|
||||
itemlist = []
|
||||
for n, genre in enumerate(httptools.downloadpage(host + api_url + 'categories', post={}).json.get('categories', [])):
|
||||
itemlist.append(item.clone(action="peliculas", genre=genre.get('name'), title=genre.get('value'), n=n))
|
||||
return support.thumb(itemlist, genre=True)
|
||||
|
||||
|
||||
def peliculas(item, text=''):
|
||||
support.info('search', item)
|
||||
itemlist = []
|
||||
filter_type = False
|
||||
if item.genre:
|
||||
text = item.genre
|
||||
cmd = 'search/category'
|
||||
else:
|
||||
cmd = 'search'
|
||||
if not text:
|
||||
filter_type = True
|
||||
|
||||
try:
|
||||
page = int(item.url.split('?p=')[1])
|
||||
except:
|
||||
page = 1
|
||||
results = httptools.downloadpage(host + api_url + cmd, post={'search': text, 'page': page}).json.get('results', [])
|
||||
for result in results:
|
||||
contentType = 'movie' if result['type'] == 'FILM' else 'tvshow'
|
||||
if not filter_type or (filter_type and contentType == item.contentType):
|
||||
itemlist.append(item.clone(id=result.get('id'), title=result.get('title'), contentTitle=result.get('title'),
|
||||
contentSerieName='' if contentType == 'movie' else result.get('title'),
|
||||
contentPlot=result.get('description'), thumbnail=result.get('poster'),
|
||||
fanart=result.get('backdrop'), year=result.get('year'), action='episodios' if contentType == 'tvshow' else 'findvideos',
|
||||
url='{}/{}/{}-{}'.format('https://filmigratis.org', contentType, result.get('id'), support.scrapertools.slugify(result.get('title'))),
|
||||
contentType=contentType))
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
if len(results) >= per_page:
|
||||
page += 1
|
||||
support.nextPage(itemlist, item, next_page='https://filmigratis.org/category/' + str(item.n) + '/' + item.genre + '?p=' + str(page))
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, text):
|
||||
return peliculas(item, text)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
if not item.contentSeason: # film
|
||||
json = httptools.downloadpage(host + api_url + 'movie', post={'movie_id': item.id}).json
|
||||
else:
|
||||
json = httptools.downloadpage(host + api_url + 'episode/links', post={'tvshow_id': item.id, 'season_id': item.contentSeason, 'episode_id': item.contentEpisodeNumber}).json
|
||||
|
||||
for i in json.get('links', []) + json.get('special', []):
|
||||
itemlist.append(Item(url=i.get('link')))
|
||||
return support.server(item, itemlist=itemlist)
|
||||
+33
-15
@@ -3,8 +3,8 @@
|
||||
# Canale per ToonItalia
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import scrapertools, support
|
||||
import sys
|
||||
from core import httptools, scrapertools, support
|
||||
import inspect
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
@@ -90,24 +90,42 @@ def peliculas(item):
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
anime = True
|
||||
# debug = True
|
||||
patron = r'>\s*(?:(?P<season>\d+)(?:×|x|×))?(?P<episode>\d+)(?:\s+–\s+)?[ –]+(?P<title2>[^<]+)[ –]+<a (?P<data>.*?)(?:<br|</p)'
|
||||
# data = ''
|
||||
# match = support.match(item, headers=headers, patron=r'(?: /> |<p>)(?:(?P<season>\d+)×)?(?P<episode>\d+)(?:\s+–\s+)?(?P<title>[^<]+)<a (?P<data>.*?)(?:<br|</p)').matches
|
||||
# if match:
|
||||
# for m in match:
|
||||
# data += '{}{:02d}|{}|{}|'.format(m[0]+'x' if m[0] else '', int(m[1]), clean_title(m[2]), m[3])
|
||||
#
|
||||
# patron = r'(?P<episode>[^|]+)\|(?P<title>[^|]+)\|(?P<data>[^|]+)\|'
|
||||
@support.scrape
|
||||
def findepisode(item):
|
||||
actLike = 'episodios'
|
||||
patron = r'>\s*(?:(?P<season>\d+)(?:×|x|×))?(?P<episode>\d+)(?:\s+–\s+)?[ –]+(?P<title2>[^<]+)[ –]+<a (?P<data>.*?)(?:<br|</p)'
|
||||
return locals()
|
||||
|
||||
return locals()
|
||||
itemlist = findepisode(item)
|
||||
if not itemlist: itemlist = [item.clone(action='findvideos')]
|
||||
|
||||
if inspect.stack(0)[1][3] not in ['find_episodes']:
|
||||
from platformcode import autorenumber
|
||||
autorenumber.start(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
return support.server(item, item.data if item.contentType != 'movie' else support.match(item.url, headers=headers).data )
|
||||
servers = []
|
||||
itemlist = []
|
||||
|
||||
if item.data:
|
||||
data = item.data
|
||||
else:
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
matches =support.match(data, patron='href="([^"]+)[^>]+>([^<\d]+)(\d+p)?').matches
|
||||
if matches:
|
||||
for match in matches:
|
||||
itemlist.append(item.clone(server=match[1].strip().lower(), quality=match[2], url=match[0]))
|
||||
if itemlist:
|
||||
servers = support.server(item, itemlist=itemlist)
|
||||
else:
|
||||
servvers = support.server(item, data=data)
|
||||
return servers
|
||||
|
||||
# return support.server(item, item.data if item.contentType != 'movie' else support.match(item.url, headers=headers).data )
|
||||
|
||||
|
||||
def clean_title(title):
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"id": "vedohd",
|
||||
"name": "VedoHD",
|
||||
"language": ["ita"],
|
||||
"active": false,
|
||||
"thumbnail": "vedohd.png",
|
||||
"banner": "vedohd.png",
|
||||
"categories": ["movie"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per vedohd
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import scrapertools, support, autoplay
|
||||
from platformcode import logger, config
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = ""
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
|
||||
|
||||
|
||||
#esclusione degli articoli 'di servizio'
|
||||
blacklist = ['CB01.UNO ▶ TROVA L’INDIRIZZO UFFICIALE ', 'AVVISO IMPORTANTE – CB01.UNO', 'GUIDA VEDOHD']
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = [
|
||||
('I più votati', ["ratings/?get=movies", 'peliculas']),
|
||||
('I più popolari', ["trending/?get=movies", 'peliculas']),
|
||||
('Generi', ['ratings/?get=movies', 'menu', 'genres']),
|
||||
('Anno', ["", 'menu', 'releases']),
|
||||
]
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.info("search",text)
|
||||
item.url = item.url + "/?s=" + text
|
||||
|
||||
return support.dooplay_search(item, blacklist)
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
return support.dooplay_peliculas(item, False, blacklist)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
for link in support.dooplay_get_links(item, host):
|
||||
if link['title'] != 'Trailer':
|
||||
server, quality = scrapertools.find_single_match(link['title'], '([^ ]+) ?(HD|3D)?')
|
||||
if quality:
|
||||
title = server + " [COLOR blue][" + quality + "][/COLOR]"
|
||||
else:
|
||||
title = server
|
||||
itemlist.append(item.clone(action="play", title=title, url=link['url'], server=server, quality=quality,))
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
return support.dooplay_menu(item, item.args)
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.debug()
|
||||
|
||||
data = support.swzz_get_url(item)
|
||||
|
||||
return support.server(item, data, headers=headers)
|
||||
+69
-25
@@ -2,14 +2,17 @@
|
||||
# ------------------------------------------------------------
|
||||
# Canale per vvvvid
|
||||
# ----------------------------------------------------------
|
||||
import functools, re
|
||||
|
||||
import requests, sys, inspect
|
||||
from core import jsontools, support, tmdb
|
||||
from core import support, tmdb, httptools
|
||||
from platformcode import autorenumber, logger, config
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
host = 'https://www.vvvvid.it'
|
||||
|
||||
# Creating persistent session
|
||||
current_session = requests.Session()
|
||||
# current_session.request = functools.partial(current_session.request, timeout=httptools.HTTPTOOLS_DEFAULT_DOWNLOAD_TIMEOUT)
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36'}
|
||||
|
||||
# Getting conn_id token from vvvvid and creating payload
|
||||
@@ -24,7 +27,7 @@ except:
|
||||
|
||||
|
||||
main_host = host + '/vvvvid/ondemand/'
|
||||
# host = main_host
|
||||
pagination = 20
|
||||
|
||||
|
||||
@support.menu
|
||||
@@ -87,6 +90,7 @@ def search(item, text):
|
||||
def newest(categoria):
|
||||
item = support.Item()
|
||||
item.args = 'channel/10007/last/'
|
||||
item.newest = True
|
||||
if categoria == 'peliculas':
|
||||
item.contentType = 'movie'
|
||||
item.url = main_host + 'film/'
|
||||
@@ -100,12 +104,13 @@ def newest(categoria):
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
if not item.page:item.page = 1
|
||||
itemlist = []
|
||||
# support.dbg()
|
||||
if not item.args:
|
||||
json_file =loadjs(item.url + 'channel/10005/last/')
|
||||
support.logger.debug(json_file)
|
||||
make_itemlist(itemlist, item, json_file)
|
||||
if not itemlist:
|
||||
json_file =loadjs(item.url + 'channel/10005/last/')
|
||||
support.logger.debug(json_file)
|
||||
make_itemlist(itemlist, item, json_file)
|
||||
|
||||
elif ('=' not in item.args) and ('=' not in item.url):
|
||||
json_file=loadjs(item.url + item.args)
|
||||
@@ -127,6 +132,28 @@ def peliculas(item):
|
||||
json_file=loadjs(item.url)
|
||||
item.args=''
|
||||
make_itemlist(itemlist, item, json_file)
|
||||
|
||||
itlist = []
|
||||
if not item.newest:
|
||||
for i, it in enumerate(itemlist):
|
||||
if pagination and (item.page - 1) * pagination > i: continue # pagination
|
||||
if pagination and i >= item.page * pagination: break # pagination
|
||||
|
||||
itlist.append(it)
|
||||
|
||||
if pagination and len(itemlist) >= pagination:
|
||||
if inspect.stack(0)[1][3] != 'get_newest':
|
||||
itlist.append(
|
||||
item.clone(action='peliculas',
|
||||
title=support.typo(config.get_localized_string(30992), 'color kod bold'),
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show,
|
||||
url=item.url,
|
||||
args=item.args,
|
||||
page=item.page + 1,
|
||||
thumbnail=support.thumb()))
|
||||
itemlist = itlist
|
||||
|
||||
if 'category' in item.args:
|
||||
support.thumb(itemlist,genre=True)
|
||||
elif not 'filter' in item.args:
|
||||
@@ -165,7 +192,7 @@ def episodios(item):
|
||||
action= 'findvideos',
|
||||
video_id= episode['video_id']))
|
||||
|
||||
if inspect.stack()[1][3] not in ['find_episodes']:
|
||||
if inspect.stack(0)[1][3] not in ['find_episodes']:
|
||||
autorenumber.start(itemlist, item)
|
||||
|
||||
support.videolibrary(itemlist,item)
|
||||
@@ -184,9 +211,16 @@ def findvideos(item):
|
||||
logger.info(episode)
|
||||
if episode['video_id'] == item.video_id:
|
||||
url = vvvvid_decoder.dec_ei(episode['embed_info'] or episode['embed_info_sd'])
|
||||
if 'youtube' in url: item.url = url
|
||||
# if 'youtube' in url: item.url = url
|
||||
item.url = url.replace('manifest.f4m','master.m3u8').replace('http://','https://').replace('/z/','/i/')
|
||||
if 'https' not in item.url:
|
||||
if 'youtube' in url:
|
||||
itemlist.append(
|
||||
item.clone(action= 'play',
|
||||
title= 'YouTube',
|
||||
url= item.url,
|
||||
server= 'youtube')
|
||||
)
|
||||
elif 'https' not in item.url:
|
||||
url = support.match('https://or01.top-ix.org/videomg/_definst_/mp4:' + item.url + '/playlist.m3u').data
|
||||
url = url.split()[-1]
|
||||
itemlist.append(
|
||||
@@ -203,7 +237,8 @@ def findvideos(item):
|
||||
item.clone(action= 'play',
|
||||
title=config.get_localized_string(30137),
|
||||
url= item.url + '?' + key,
|
||||
server= 'directo')
|
||||
server= 'directo',
|
||||
manifest='hls')
|
||||
)
|
||||
|
||||
return support.server(item, itemlist=itemlist, Download=False)
|
||||
@@ -214,23 +249,32 @@ def make_itemlist(itemlist, item, data):
|
||||
for key in data['data']:
|
||||
if search.lower() in encode(key['title']).lower():
|
||||
title = encode(key['title'])
|
||||
fulltitle=title.split('-')[0].strip()
|
||||
infoLabels['year'] = key['date_published']
|
||||
fulltitle=re.split(' - |\(', title)[0].strip()
|
||||
ct = key.get('show_type_name', '').lower()
|
||||
|
||||
if ct == 'serie': contentType = 'tvshow'
|
||||
elif ct == 'film': contentType = 'movie'
|
||||
else: contentType = item.contentType
|
||||
|
||||
infoLabels['title'] = fulltitle
|
||||
if item.contentType != 'movie': infoLabels['tvshowtitle'] = fulltitle
|
||||
itemlist.append(
|
||||
item.clone(title = support.typo(title, 'bold'),
|
||||
fulltitle= title,
|
||||
show= title,
|
||||
url= main_host + str(key['show_id']) + '/seasons/',
|
||||
action= 'findvideos' if item.contentType == 'movie' else 'episodios',
|
||||
contentType = item.contentType,
|
||||
contentSerieName= fulltitle if item.contentType != 'movie' else '',
|
||||
contentTitle= fulltitle if item.contentType == 'movie' else '',
|
||||
infoLabels=infoLabels,
|
||||
videolibrary=False))
|
||||
infoLabels['tvshowtitle'] = fulltitle
|
||||
infoLabels['mediatype'] = contentType
|
||||
infoLabels['year'] = key['date_published']
|
||||
|
||||
it = item.clone(title = support.typo(title, 'bold'),
|
||||
fulltitle= title,
|
||||
show= title,
|
||||
url= main_host + str(key['show_id']) + '/seasons/',
|
||||
action= 'findvideos' if contentType == 'movie' else 'episodios',
|
||||
infoLabels=infoLabels,
|
||||
thumbnail=support.thumb(contentType),
|
||||
videolibrary=False)
|
||||
|
||||
itemlist.append(it)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def loadjs(url):
|
||||
if '?category' not in url:
|
||||
url += '?full=true'
|
||||
|
||||
+1
-1
@@ -253,7 +253,7 @@ def set_channel_info(parameters):
|
||||
def auto_filter(auto_lang=False):
|
||||
list_lang = ['ita', 'vos', 'sub-ita']
|
||||
if config.get_setting("channel_language") == 'auto' or auto_lang == True:
|
||||
lang = config.get_localized_string(20001)
|
||||
lang = config.get_language()
|
||||
|
||||
else:
|
||||
lang = config.get_setting("channel_language", default="all")
|
||||
|
||||
+9
-6
@@ -1,10 +1,12 @@
|
||||
from platformcode import config, logger
|
||||
import xbmc, sys, xbmcgui, os
|
||||
|
||||
|
||||
librerias = xbmc.translatePath(os.path.join(config.get_runtime_path(), 'lib'))
|
||||
sys.path.insert(0, librerias)
|
||||
|
||||
from core import jsontools, support
|
||||
from core.item import Item
|
||||
|
||||
addon_id = config.get_addon_core().getAddonInfo('id')
|
||||
|
||||
@@ -15,6 +17,7 @@ f.close()
|
||||
|
||||
|
||||
def build_menu():
|
||||
# from core.support import dbg;dbg()
|
||||
tmdbid = xbmc.getInfoLabel('ListItem.Property(tmdb_id)')
|
||||
mediatype = xbmc.getInfoLabel('ListItem.DBTYPE')
|
||||
title = xbmc.getInfoLabel('ListItem.Title')
|
||||
@@ -24,9 +27,9 @@ def build_menu():
|
||||
containerPath = xbmc.getInfoLabel('Container.FolderPath')
|
||||
|
||||
logstr = "Selected ListItem is: 'IMDB: {}' - TMDB: {}' - 'Title: {}' - 'Year: {}'' - 'Type: {}'".format(imdb, tmdbid, title, year, mediatype)
|
||||
logger.info(logstr)
|
||||
logger.info(filePath)
|
||||
logger.info(containerPath)
|
||||
logger.debug(logstr)
|
||||
logger.debug(filePath)
|
||||
logger.debug(containerPath)
|
||||
|
||||
contextmenuitems = []
|
||||
contextmenuactions = []
|
||||
@@ -35,20 +38,20 @@ def build_menu():
|
||||
logger.debug('check contextmenu', itemmodule)
|
||||
module = __import__(itemmodule, None, None, [itemmodule])
|
||||
|
||||
logger.info('Add contextmenu item ->', itemmodule)
|
||||
logger.debug('Add contextmenu item ->', itemmodule)
|
||||
module_item_actions = module.get_menu_items()
|
||||
contextmenuitems.extend([item for item, fn in module_item_actions])
|
||||
contextmenuactions.extend([fn for item, fn in module_item_actions])
|
||||
|
||||
if len(contextmenuitems) == 0:
|
||||
logger.info('No contextmodule found, build an empty one')
|
||||
logger.debug('No contextmodule found, build an empty one')
|
||||
contextmenuitems.append(empty_item())
|
||||
contextmenuactions.append(lambda: None)
|
||||
|
||||
ret = xbmcgui.Dialog().contextmenu(contextmenuitems)
|
||||
|
||||
if ret > -1:
|
||||
logger.info('Contextmenu module index', ret, ', label=' + contextmenuitems[ret])
|
||||
logger.debug('Contextmenu module index', ret, ', label=' + contextmenuitems[ret])
|
||||
contextmenuactions[ret]()
|
||||
|
||||
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
import base64
|
||||
import socket
|
||||
from http.server import BaseHTTPRequestHandler, HTTPServer
|
||||
import xbmc, random
|
||||
from core import jsontools, httptools
|
||||
from platformcode import logger
|
||||
|
||||
hostName = xbmc.getIPAddress()
|
||||
serverPort = random.randint(49152, 65535)
|
||||
ret = []
|
||||
call = 'kodapp://app.kod/open?s={}&ua={}&cb=http://{}:{}/'
|
||||
|
||||
|
||||
class MyServer(BaseHTTPRequestHandler):
|
||||
def do_POST(self):
|
||||
global ret
|
||||
length = int(self.headers['content-length'])
|
||||
postvars = self.rfile.read(length).decode()
|
||||
ret = jsontools.load(postvars)
|
||||
logger.info(ret)
|
||||
self.send_response(200)
|
||||
self.send_header("Content-type", "text/plain")
|
||||
self.end_headers()
|
||||
self.wfile.write(b"OK")
|
||||
|
||||
|
||||
def call_url(url):
|
||||
global serverPort
|
||||
webServer = None
|
||||
for t in range(10): # try up to 10 port if already in use
|
||||
try:
|
||||
webServer = HTTPServer((hostName, serverPort), MyServer)
|
||||
break
|
||||
except socket.error:
|
||||
serverPort += 1
|
||||
if webServer:
|
||||
logger.info("Server started http://%s:%s" % (hostName, serverPort))
|
||||
s = base64.b64encode(jsontools.dump({'url': url}).encode()).decode()
|
||||
ua = base64.b64encode(httptools.get_user_agent().encode()).decode()
|
||||
uri = call.format(s, ua, hostName, serverPort)
|
||||
if logger.DEBUG_ENABLED:
|
||||
uri += '&l=1'
|
||||
activity = 'StartAndroidActivity("com.kodapp","android.intent.action.VIEW","",{})'.format(uri)
|
||||
logger.info(activity)
|
||||
xbmc.executebuiltin(activity)
|
||||
while not ret:
|
||||
webServer.handle_request()
|
||||
logger.info("Server stopped.")
|
||||
return ret
|
||||
+12
-3
@@ -27,7 +27,9 @@ def start(itemlist, item):
|
||||
:return: try to auto-reproduce, in case of failure it returns the itemlist that it received in the beginning
|
||||
'''
|
||||
|
||||
if item.global_search:
|
||||
if item.global_search or item.from_action or item.contentAction: # from_action means that's a special function calling this (ex: add to videolibrary)
|
||||
return itemlist
|
||||
if len([s for s in itemlist if s.server]) == 1:
|
||||
return itemlist
|
||||
logger.debug()
|
||||
|
||||
@@ -39,7 +41,14 @@ def start(itemlist, item):
|
||||
if not config.is_xbmc():
|
||||
return itemlist
|
||||
|
||||
if config.get_setting('autoplay') or (item.channel == 'community' and item.autoplay):
|
||||
import xbmc
|
||||
control_info = xbmc.getInfoLabel('Container.FolderPath')
|
||||
if control_info:
|
||||
control_item = Item().fromurl(control_info)
|
||||
if control_item.action == item.action:
|
||||
return itemlist
|
||||
|
||||
if config.get_setting('autoplay') or item.autoplay:
|
||||
# Save the current value of "Action and Player Mode" in preferences
|
||||
user_config_setting_action = config.get_setting("default_action")
|
||||
# user_config_setting_player = config.get_setting("player_mode")
|
||||
@@ -119,7 +128,7 @@ def start(itemlist, item):
|
||||
max_intents_servers[videoitem.server.lower()] = max_intents
|
||||
|
||||
# If there are no items in the list, it is reported
|
||||
if autoplay_elem == autoplay_list[-1]:
|
||||
if autoplay_elem == autoplay_list[-1] and autoplay_elem.server != 'torrent':
|
||||
platformtools.dialog_notification('AutoPlay', config.get_localized_string(60072) % name)
|
||||
|
||||
else:
|
||||
|
||||
+33
-13
@@ -30,7 +30,7 @@ cookies_file = os.path.join(config.get_data_path(), "cookies.dat")
|
||||
|
||||
# Headers by default, if nothing is specified
|
||||
default_headers = dict()
|
||||
default_headers["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36" % config.get_setting("chrome_ua_version")
|
||||
default_headers["User-Agent"] = "Mozilla/5.0 (Linux; Android 13; SM-A205U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36" % config.get_setting("chrome_ua_version")
|
||||
default_headers["Accept"] = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"
|
||||
default_headers["Accept-Language"] = "it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3"
|
||||
default_headers["Accept-Charset"] = "UTF-8"
|
||||
@@ -48,11 +48,11 @@ directIP = {
|
||||
'nored.icu': '31.220.1.77',
|
||||
'wstream.icu': '31.220.1.77',
|
||||
'wstream.video': '31.220.1.77',
|
||||
'krask.xyz': '31.220.1.77'
|
||||
'krask.xyz': '31.220.1.77',
|
||||
}
|
||||
|
||||
# Maximum wait time for downloadpage, if nothing is specified
|
||||
HTTPTOOLS_DEFAULT_DOWNLOAD_TIMEOUT = config.get_setting('httptools_timeout', default=15)
|
||||
HTTPTOOLS_DEFAULT_DOWNLOAD_TIMEOUT = config.get_setting('httptools_timeout', default=5)
|
||||
if HTTPTOOLS_DEFAULT_DOWNLOAD_TIMEOUT == 0: HTTPTOOLS_DEFAULT_DOWNLOAD_TIMEOUT = None
|
||||
|
||||
# Random use of User-Agents, if nad is not specified
|
||||
@@ -375,8 +375,14 @@ def downloadpage(url, **opt):
|
||||
timeout=opt['timeout'])
|
||||
else:
|
||||
# Makes the request with POST method
|
||||
req = session.post(url, data=payload, allow_redirects=opt.get('follow_redirects', True),
|
||||
req = session.post(url, data=payload, allow_redirects=False,
|
||||
files=files, timeout=opt['timeout'])
|
||||
# Make sure it follows redirects
|
||||
i = 10
|
||||
while opt.get('follow_redirects', True) and i > 0 and req.status_code == 301:
|
||||
req = session.post(req.headers['Location'], data=payload, allow_redirects=False,
|
||||
files=files, timeout=opt['timeout'])
|
||||
i -= 1
|
||||
|
||||
elif opt.get('only_headers', False):
|
||||
info_dict = fill_fields_pre(url, opt, proxy_data, file_name)
|
||||
@@ -412,6 +418,8 @@ def downloadpage(url, **opt):
|
||||
return type('HTTPResponse', (), response)
|
||||
|
||||
response_code = req.status_code
|
||||
response_headers = req.headers
|
||||
cookies = req.cookies
|
||||
response['url'] = req.url
|
||||
|
||||
response['data'] = req.content if req.content else ''
|
||||
@@ -425,13 +433,25 @@ def downloadpage(url, **opt):
|
||||
if req.headers.get('Server', '').startswith('cloudflare') and response_code in [429, 503, 403]\
|
||||
and not opt.get('CF', False) and 'Ray ID' in response['data'] and not opt.get('post', None):
|
||||
logger.debug("CF retry... for domain: %s" % domain)
|
||||
from lib import proxytranslate
|
||||
gResp = proxytranslate.process_request_proxy(url)
|
||||
if gResp:
|
||||
req = gResp['result']
|
||||
response_code = req.status_code
|
||||
response['url'] = gResp['url']
|
||||
response['data'] = gResp['data']
|
||||
from core import app
|
||||
ret = app.call_url(url)
|
||||
for elem in ret:
|
||||
if elem['key'] == 'html':
|
||||
response['data'] = elem['html']
|
||||
elif elem['key'] == 'cookie':
|
||||
for cookie in elem:
|
||||
if cookie == 'key': # not a cookie
|
||||
continue
|
||||
elem[cookie]['domain'] = domain
|
||||
set_cookies(elem[cookie], False)
|
||||
response_code = [r['status'] for r in ret if r['key'] == 'request'][0]
|
||||
# from lib import proxytranslate
|
||||
# gResp = proxytranslate.process_request_proxy(url)
|
||||
# if gResp:
|
||||
# req = gResp['result']
|
||||
# response_code = req.status_code
|
||||
# response['url'] = gResp['url']
|
||||
# response['data'] = gResp['data']
|
||||
|
||||
if not response['data']:
|
||||
response['data'] = ''
|
||||
@@ -442,8 +462,8 @@ def downloadpage(url, **opt):
|
||||
response['json'] = dict()
|
||||
|
||||
response['code'] = response_code
|
||||
response['headers'] = req.headers
|
||||
response['cookies'] = req.cookies
|
||||
response['headers'] = response_headers
|
||||
response['cookies'] = cookies
|
||||
|
||||
info_dict, response = fill_fields_post(info_dict, req, response, req_headers, inicio)
|
||||
|
||||
|
||||
+8
-2
@@ -283,6 +283,12 @@ class Item(object):
|
||||
def __str__(self):
|
||||
return '\r\t' + self.tostring('\r\t')
|
||||
|
||||
def __eq__(self, other):
|
||||
if type(other) == Item:
|
||||
return self.__dict__ == other.__dict__
|
||||
else:
|
||||
return False
|
||||
|
||||
def set_parent_content(self, parentContent):
|
||||
"""
|
||||
Fill the contentDetails fields with the information of the item "parent"
|
||||
@@ -349,7 +355,7 @@ class Item(object):
|
||||
dump = "".encode("utf8")
|
||||
return str(urllib.quote(base64.b64encode(dump)))
|
||||
|
||||
def fromurl(self, url):
|
||||
def fromurl(self, url, silent=False):
|
||||
"""
|
||||
Generate an item from a text string. The string can be created by the tourl () function or have
|
||||
the old format: plugin: //plugin.video.kod/? channel = ... (+ other parameters)
|
||||
@@ -363,7 +369,7 @@ class Item(object):
|
||||
decoded = False
|
||||
try:
|
||||
str_item = base64.b64decode(urllib.unquote(url))
|
||||
json_item = json.load(str_item, object_hook=self.toutf8)
|
||||
json_item = json.load(str_item, object_hook=self.toutf8, silent=silent)
|
||||
if json_item is not None and len(json_item) > 0:
|
||||
self.__dict__.update(json_item)
|
||||
decoded = True
|
||||
|
||||
+10
-3
@@ -16,15 +16,22 @@ if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
|
||||
|
||||
|
||||
def load(*args, **kwargs):
|
||||
silent = False
|
||||
if 'silent' in kwargs:
|
||||
silent = kwargs['silent']
|
||||
kwargs.pop('silent')
|
||||
|
||||
if "object_hook" not in kwargs:
|
||||
kwargs["object_hook"] = to_utf8
|
||||
|
||||
try:
|
||||
value = json.loads(*args, **kwargs)
|
||||
except:
|
||||
logger.error("**NOT** able to load the JSON")
|
||||
logger.error(traceback.format_exc())
|
||||
logger.error('ERROR STACK ' + str(stack()[1][3]))
|
||||
if not silent:
|
||||
logger.error("**NOT** able to load the JSON")
|
||||
logger.error(traceback.format_exc())
|
||||
if len(stack()) > 1:
|
||||
logger.error('ERROR STACK {}'.format(stack()[2]) )
|
||||
value = {}
|
||||
|
||||
return value
|
||||
|
||||
+5
-2
@@ -59,13 +59,16 @@ class CipherSuiteAdapter(host_header_ssl.HostHeaderSSLAdapter):
|
||||
cache = db['dnscache'].get(domain, {})
|
||||
ip = None
|
||||
if type(cache) != dict or (cache.get('datetime') and
|
||||
current_date - cache.get('datetime') > datetime.timedelta(days=7)):
|
||||
current_date - cache.get('datetime') > datetime.timedelta(hours=1)):
|
||||
cache = None
|
||||
|
||||
if not cache: # not cached
|
||||
try:
|
||||
ip = doh.query(domain)[0]
|
||||
logger.info('Query DoH: ' + domain + ' = ' + str(ip))
|
||||
# IPv6 address
|
||||
if ':' in ip:
|
||||
ip = '[' + ip + ']'
|
||||
self.writeToCache(domain, ip)
|
||||
except Exception:
|
||||
logger.error('Failed to resolve hostname, fallback to normal dns')
|
||||
@@ -96,7 +99,7 @@ class CipherSuiteAdapter(host_header_ssl.HostHeaderSSLAdapter):
|
||||
domain = parse.netloc
|
||||
else:
|
||||
raise requests.exceptions.URLRequired
|
||||
if not scrapertools.find_single_match(domain, '\d+\.\d+\.\d+\.\d+'):
|
||||
if not scrapertools.find_single_match(domain, '\d+\.\d+\.\d+\.\d+') and ':' not in domain:
|
||||
ip = self.getIp(domain)
|
||||
else:
|
||||
ip = None
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user