支持高清普斯特

This commit is contained in:
ngfchl
2022-12-26 14:39:34 +08:00
parent 40cb8bf760
commit a5d898726a
3 changed files with 161 additions and 1 deletions

79
pt.json
View File

@@ -6635,6 +6635,85 @@
"hash_rule": "//td/b[contains(text(),\"Hash\")]/following::text()[1]"
}
},
{
"model": "pt_site.site",
"pk": 98,
"fields": {
"created_at": "2022-12-26T14:03:05.511",
"updated_at": "2022-12-26T14:24:36.470",
"url": "https://pt.hdpost.top/",
"name": "普斯特",
"logo": "https://pt.hdpost.top/favicon.ico",
"tracker": "pt.post.top",
"sign_in_support": false,
"get_torrent_support": true,
"get_userinfo_support": true,
"search_support": false,
"page_default": "torrents?perPage=100&free[0]=100",
"page_sign_in": "attendance.php",
"page_control_panel": "usercp.php",
"page_detail": "details.php?id={}",
"page_download": "download.php?id={}",
"page_user": "users/{}",
"page_search": "torrents.php?search={}",
"page_leeching": "getusertorrentlistajax.php?userid={}&type=leeching",
"page_uploaded": "getusertorrentlistajax.php?userid={}&type=uploaded",
"page_seeding": "users/{}",
"page_completed": "getusertorrentlistajax.php?userid={}&type=completed",
"page_mybonus": "users/{}/bonus/earnings",
"page_viewfilelist": "viewfilelist.php?id={}",
"page_viewpeerlist": "viewpeerlist.php?id={}",
"sign_in_method": "get",
"sign_in_captcha": false,
"sign_in_params": "{}",
"sign_in_headers": "{}",
"hr": false,
"hr_rate": 2,
"hr_time": 10,
"sp_full": 100.0,
"limit_speed": 100,
"torrents_rule": "//table[@class=\"torrents\"]/tr",
"name_rule": ".//td[@class=\"embedded\"]/a/b/text()",
"title_rule": ".//a[contains(@href,\"detail\")]/parent::td/text()[last()]",
"detail_url_rule": ".//td[@class=\"embedded\"]/a[contains(@href,\"detail\")]/@href",
"category_rule": ".//td[@class=\"rowfollow nowrap\"][1]/a[1]/img/@title",
"poster_rule": ".//table/tr/td[1]/img/@src",
"magnet_url_rule": ".//td/a[contains(@href,\"download.php?id=\")]/@href",
"download_url_rule": ".//a[contains(@href,\"download.php?id=\") and contains(@href,\"passkey\")]/@href",
"size_rule": ".//td[5]/text()",
"hr_rule": ".//table/tr/td/img[@class=\"hitandrun\"]/@title",
"sale_rule": ".//img[contains(@class,\"free\")]/@alt",
"sale_expire_rule": ".//img[contains(@class,\"free\")]/following-sibling::font/span/@title",
"release_rule": ".//td[4]/span/@title",
"seeders_rule": ".//a[contains(@href,\"#seeders\")]/text()",
"leechers_rule": ".//a[contains(@href,\"#leechers\")]/text()",
"completers_rule": ".//a[contains(@href,\"viewsnatches\")]//text()",
"viewfilelist_rule": ".//td/text()",
"viewpeerlist_rule": ".//tr/td[9]/nobr/text()",
"peer_speed_rule": ".//tr/td[7]/nobr/text()",
"remark": "",
"invitation_rule": "//td[contains(text(),\"邀请\") and not(contains(text(),\"可以\"))]/following-sibling::td/span/text()",
"time_join_rule": "//div[@class=\"header gradient blue\"]//h4[2]/text()",
"latest_active_rule": "//td[contains(text(),\" 上次登录时间\")]/following-sibling::td/text()",
"uploaded_rule": "//li[@title=\"上传\"]/text()",
"downloaded_rule": "//li[@title=\"下载\"]/text()",
"ratio_rule": "//li[@title=\"分享率\"]/a/text()",
"my_sp_rule": "//li[@title=\"我的魔力\"]/a/text()",
"hour_sp_rule": "//dt[contains(text(),\"每小时点数\")]/following-sibling::dd[1]/text()[1]",
"my_bonus_rule": "//font[@class=\"color_bonus\" and contains(text(),\"积分\")]/following-sibling::text()[1]",
"my_level_rule": "//div[@class=\"header gradient blue\"]//h4[1]/span/text()",
"my_passkey_rule": "//span[@class=\"text-monospace\"]/text()",
"my_uid_rule": "//div[@class=\"header gradient blue\"]//h2/text()[1]",
"my_hr_rule": "//strong[contains(text(),\"有效\")]/text()",
"leech_rule": "//li[@title=\"吸血\"]/a/text()",
"seed_rule": "//li[@title=\"做种\"]/a/text()",
"record_count_rule": ".//td[3]/text()",
"seed_vol_rule": "//td[contains(text(),\"做种体积\")]/following-sibling::td[1]//text()[1]",
"mailbox_rule": "//a[@href=\"messages.php\"]/font[contains(text(),\"条\")]/text()[1]",
"notice_rule": "//a[@href=\"index.php\"]/font[contains(text(),\"条\")]/text()[1]",
"hash_rule": "//td/b[contains(text(),\"Hash\")]/following::text()[1]"
}
},
{
"model": "auto_pt.task",
"pk": 1,

View File

@@ -1738,6 +1738,7 @@ class PtSpider:
logger.info(f'白兔做种信息:{seed_vol_all}')
elif site.url in [
'https://monikadesign.uk/',
'https://pt.hdpost.top/',
'https://filelist.io/',
]:
seed_vol_size = ''.join(seeding_html.xpath(site.seed_vol_rule)).replace('i', '')
@@ -1825,7 +1826,10 @@ class PtSpider:
# logger.info('注册时间:', time_join_1)
# time_join = time_join_1.replace('(', '').replace(')', '').strip('\xa0').strip()
logger.info(f'注册时间:{details_html.xpath(site.time_join_rule)}')
if 'monikadesign.uk' in site.url:
if site.url in [
'https://monikadesign.uk/',
'https://pt.hdpost.top/',
]:
time_str = ''.join(details_html.xpath(site.time_join_rule))
time_str = re.sub(u"[\u4e00-\u9fa5]", "", time_str).strip()
time_join = datetime.strptime(time_str, '%b %d %Y')
@@ -2037,6 +2041,7 @@ class PtSpider:
url = site.url + site.page_mybonus
if site.url in [
'https://monikadesign.uk/',
'https://pt.hdpost.top/',
'https://exoticaz.to/',
'https://cinemaz.to/',
'https://avistaz.to/',

View File

@@ -6382,5 +6382,81 @@
"my_uid_rule": "//div[@class=\"status_avatar\"]/a[contains(@href, \"/userdetails.php?id=\")]/@href",
"page_control_panel": "my.php",
"tracker": "reactor.filelist.io"
},
{
"id": 98,
"created_at": "2022-12-26 14:03:05.511105",
"updated_at": "2022-12-26 14:24:36.470778",
"name": "普斯特",
"url": "https://pt.hdpost.top/",
"logo": "https://pt.hdpost.top/favicon.ico",
"sign_in_support": 0,
"get_torrent_support": 1,
"get_userinfo_support": 1,
"search_support": 0,
"page_default": "torrents?perPage=100&free[0]=100",
"page_sign_in": "attendance.php",
"page_detail": "details.php?id={}",
"page_download": "download.php?id={}",
"page_user": "users/{}",
"page_search": "torrents.php?search={}",
"page_leeching": "getusertorrentlistajax.php?userid={}&type=leeching",
"page_uploaded": "getusertorrentlistajax.php?userid={}&type=uploaded",
"page_seeding": "users/{}",
"page_completed": "getusertorrentlistajax.php?userid={}&type=completed",
"page_mybonus": "users/{}/bonus/earnings",
"page_viewfilelist": "viewfilelist.php?id={}",
"page_viewpeerlist": "viewpeerlist.php?id={}",
"sign_in_method": "get",
"sign_in_captcha": 0,
"sign_in_params": "{}",
"sign_in_headers": "{}",
"hr": 0,
"hr_rate": 2,
"hr_time": 10,
"sp_full": 100,
"limit_speed": 100,
"torrents_rule": "//table[@class=\"torrents\"]/tr",
"name_rule": ".//td[@class=\"embedded\"]/a/b/text()",
"title_rule": ".//a[contains(@href,\"detail\")]/parent::td/text()[last()]",
"detail_url_rule": ".//td[@class=\"embedded\"]/a[contains(@href,\"detail\")]/@href",
"category_rule": ".//td[@class=\"rowfollow nowrap\"][1]/a[1]/img/@title",
"poster_rule": ".//table/tr/td[1]/img/@src",
"magnet_url_rule": ".//td/a[contains(@href,\"download.php?id=\")]/@href",
"download_url_rule": ".//a[contains(@href,\"download.php?id=\") and contains(@href,\"passkey\")]/@href",
"size_rule": ".//td[5]/text()",
"hr_rule": ".//table/tr/td/img[@class=\"hitandrun\"]/@title",
"sale_rule": ".//img[contains(@class,\"free\")]/@alt",
"sale_expire_rule": ".//img[contains(@class,\"free\")]/following-sibling::font/span/@title",
"release_rule": ".//td[4]/span/@title",
"seeders_rule": ".//a[contains(@href,\"#seeders\")]/text()",
"leechers_rule": ".//a[contains(@href,\"#leechers\")]/text()",
"completers_rule": ".//a[contains(@href,\"viewsnatches\")]//text()",
"viewfilelist_rule": ".//td/text()",
"viewpeerlist_rule": ".//tr/td[9]/nobr/text()",
"peer_speed_rule": ".//tr/td[7]/nobr/text()",
"remark": "",
"invitation_rule": "//td[contains(text(),\"邀请\") and not(contains(text(),\"可以\"))]/following-sibling::td/span/text()",
"time_join_rule": "//div[@class=\"header gradient blue\"]//h4[2]/text()",
"latest_active_rule": "//td[contains(text(),\" 上次登录时间\")]/following-sibling::td/text()",
"uploaded_rule": "//li[@title=\"上传\"]/text()",
"downloaded_rule": "//li[@title=\"下载\"]/text()",
"ratio_rule": "//li[@title=\"分享率\"]/a/text()",
"my_sp_rule": "//li[@title=\"我的魔力\"]/a/text()",
"hour_sp_rule": "//dt[contains(text(),\"每小时点数\")]/following-sibling::dd[1]/text()[1]",
"my_bonus_rule": "//font[@class=\"color_bonus\" and contains(text(),\"积分\")]/following-sibling::text()[1]",
"my_level_rule": "//div[@class=\"header gradient blue\"]//h4[1]/span/text()",
"my_hr_rule": "//strong[contains(text(),\"有效\")]/text()",
"leech_rule": "//li[@title=\"吸血\"]/a/text()",
"seed_rule": "//li[@title=\"做种\"]/a/text()",
"record_count_rule": ".//td[3]/text()",
"seed_vol_rule": "//td[contains(text(),\"做种体积\")]/following-sibling::td[1]//text()[1]",
"mailbox_rule": "//a[@href=\"messages.php\"]/font[contains(text(),\"条\")]/text()[1]",
"hash_rule": "//td/b[contains(text(),\"Hash\")]/following::text()[1]",
"notice_rule": "//a[@href=\"index.php\"]/font[contains(text(),\"条\")]/text()[1]",
"my_passkey_rule": "//span[@class=\"text-monospace\"]/text()",
"my_uid_rule": "//div[@class=\"header gradient blue\"]//h2/text()[1]",
"page_control_panel": "usercp.php",
"tracker": "pt.post.top"
}
]