# BeyondHD-Parser
This package includes a way to utilize BeyondHD's search API as well as parse URL's for MediaInfo/NFO
## Install
`pip install BeyondHD-Parser`
## Uninstall
`pip uninstall BeyondHD-Parser`
## Example of how to use search API
```python
from beyondhd_parser.beyondhd_search import BeyondHDAPI, BhdApiError, ApiKeyError
# basic ##########################
search_beyondhd = BeyondHDAPI(api_key="NEED KEY", rss_key="OPTIONAL KEY")
search_beyondhd.search(title="Gone In 60 Seconds")
if search_beyondhd.success:
print("Do something with results:\n" + str(search_beyondhd.get_results()))
elif not search_beyondhd.success:
print("No results")
# full work flow with error handling ##################
try:
search_beyondhd = BeyondHDAPI(api_key="NEED KEY")
search_beyondhd.search(title="Gone In 60 Seconds")
if search_beyondhd.success:
result = search_beyondhd.get_results()
print("Do something with results: " + str(result.results))
print("Current page: " + str(result.current_page))
print("Total pages: " + str(result.total_pages))
print("Total results: " + str(result.total_results))
elif not search_beyondhd.success:
print("No results")
except ConnectionError:
print("Connection Error!")
except ApiKeyError:
print("Invalid API Key")
except BhdApiError as bhd_error:
print(str(bhd_error))
```
## BeyondHDApi's .search() parameters
BeyondHDApi() only accepts URL, the .search() method is where all the magic happens
`title` Optional, title to search for in the format of _The Matrix 1999_
`categories` Optional, categories to search in the form of a list _['Movies', 'TV']_
`release_group` Optional, specify groups _BHDStudio, FraMeSToR, SacReD_
`page` Optional, allows you to select which page _int e.g. 0, 1, 2_
`resolution` Optional, can filter resolutions _720p, 1080p, etc_
`search_timeout` You can adjust the timeout time, default is 60 (seconds)
## Example of how scrape BeyondHD
```python
from beyondhd_parser.beyondhd_details import BeyondHDScrape
scrape_bhd = BeyondHDScrape(
url="URL"
)
scrape_bhd.parse_media_info()
scrape_bhd.parse_nfo()
print(scrape_bhd.nfo)
print(scrape_bhd.media_info)
```
## BeyondHDScrape() parameters
`url` Required, url to the torrent to parse
`cookie_key` Optional, but if you do not provide the key/value you must have logged in prior in a supported browser
`cookie_value` Optional, but if you do not provide the key/value you must have logged in prior in a supported browser
`auto_cookie_detection` Default is True, manual cookie input does override this. If you've logged into BeyondHD in any of the supported browsers, this will automatically inject your cookie.\
_chrome, chromium, opera, brave, edge, vivaldi, firefox and safari_
`timeout` You can adjust the timeout time, default is 60 (seconds)
## BeyondHDScrape's .parse_nfo() parameters
`bhdstudio` True or False, default is False. You can parse BHDStudio NFO's into a python dictionary
`text_only` True or False, default is False. You can strip away anything that isn't text in the NFO output
Raw data
{
"_id": null,
"home_page": "https://github.com/jlw4049/BeyondHD-Parser",
"name": "BeyondHD-Parser",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "BeyondHD-Parser",
"author": "Jessie Wilson",
"author_email": "jessielw4049@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/88/d0/903a665e051672797d6144459f721de3c03c61b26c3fc4cfbd6f8e008508/BeyondHD-Parser-2.0.0.tar.gz",
"platform": null,
"description": "# BeyondHD-Parser\n\nThis package includes a way to utilize BeyondHD's search API as well as parse URL's for MediaInfo/NFO\n\n## Install\n\n`pip install BeyondHD-Parser`\n\n## Uninstall\n\n`pip uninstall BeyondHD-Parser`\n\n## Example of how to use search API\n\n```python\nfrom beyondhd_parser.beyondhd_search import BeyondHDAPI, BhdApiError, ApiKeyError\n\n# basic ##########################\nsearch_beyondhd = BeyondHDAPI(api_key=\"NEED KEY\", rss_key=\"OPTIONAL KEY\")\nsearch_beyondhd.search(title=\"Gone In 60 Seconds\")\n\nif search_beyondhd.success:\n print(\"Do something with results:\\n\" + str(search_beyondhd.get_results()))\nelif not search_beyondhd.success:\n print(\"No results\")\n\n\n# full work flow with error handling ##################\ntry:\n search_beyondhd = BeyondHDAPI(api_key=\"NEED KEY\")\n search_beyondhd.search(title=\"Gone In 60 Seconds\")\n\n if search_beyondhd.success:\n result = search_beyondhd.get_results()\n print(\"Do something with results: \" + str(result.results))\n print(\"Current page: \" + str(result.current_page))\n print(\"Total pages: \" + str(result.total_pages))\n print(\"Total results: \" + str(result.total_results))\n elif not search_beyondhd.success:\n print(\"No results\")\n\nexcept ConnectionError:\n print(\"Connection Error!\")\n\nexcept ApiKeyError:\n print(\"Invalid API Key\")\n\nexcept BhdApiError as bhd_error:\n print(str(bhd_error))\n```\n\n## BeyondHDApi's .search() parameters\n\nBeyondHDApi() only accepts URL, the .search() method is where all the magic happens\n\n`title` Optional, title to search for in the format of _The Matrix 1999_\n\n`categories` Optional, categories to search in the form of a list _['Movies', 'TV']_\n\n`release_group` Optional, specify groups _BHDStudio, FraMeSToR, SacReD_\n\n`page` Optional, allows you to select which page _int e.g. 0, 1, 2_\n\n`resolution` Optional, can filter resolutions _720p, 1080p, etc_\n\n`search_timeout` You can adjust the timeout time, default is 60 (seconds)\n\n## Example of how scrape BeyondHD\n\n```python\nfrom beyondhd_parser.beyondhd_details import BeyondHDScrape\n\nscrape_bhd = BeyondHDScrape(\n url=\"URL\"\n)\nscrape_bhd.parse_media_info()\nscrape_bhd.parse_nfo()\nprint(scrape_bhd.nfo)\nprint(scrape_bhd.media_info)\n\n```\n\n## BeyondHDScrape() parameters\n\n`url` Required, url to the torrent to parse\n\n`cookie_key` Optional, but if you do not provide the key/value you must have logged in prior in a supported browser\n\n`cookie_value` Optional, but if you do not provide the key/value you must have logged in prior in a supported browser\n\n`auto_cookie_detection` Default is True, manual cookie input does override this. If you've logged into BeyondHD in any of the supported browsers, this will automatically inject your cookie.\\\n_chrome, chromium, opera, brave, edge, vivaldi, firefox and safari_\n\n`timeout` You can adjust the timeout time, default is 60 (seconds)\n\n## BeyondHDScrape's .parse_nfo() parameters\n\n`bhdstudio` True or False, default is False. You can parse BHDStudio NFO's into a python dictionary\n\n`text_only` True or False, default is False. You can strip away anything that isn't text in the NFO output",
"bugtrack_url": null,
"license": "MIT",
"summary": "Tool to search/scrape BeyondHD for torrent information",
"version": "2.0.0",
"project_urls": {
"Homepage": "https://github.com/jlw4049/BeyondHD-Parser"
},
"split_keywords": [
"beyondhd-parser"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "88d0903a665e051672797d6144459f721de3c03c61b26c3fc4cfbd6f8e008508",
"md5": "af0fa2b0a53959482afd32e46d9e997d",
"sha256": "d32d8672646637b4c346231dfabf56bd5c9d42fcebe7686353f63cbcfea8a809"
},
"downloads": -1,
"filename": "BeyondHD-Parser-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "af0fa2b0a53959482afd32e46d9e997d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6994,
"upload_time": "2023-10-17T15:38:09",
"upload_time_iso_8601": "2023-10-17T15:38:09.193727Z",
"url": "https://files.pythonhosted.org/packages/88/d0/903a665e051672797d6144459f721de3c03c61b26c3fc4cfbd6f8e008508/BeyondHD-Parser-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-17 15:38:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jlw4049",
"github_project": "BeyondHD-Parser",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "beyondhd-parser"
}