Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to Browsermob-Proxy #59

Closed
marco-ita opened this issue Feb 10, 2020 · 1 comment
Closed

Can't connect to Browsermob-Proxy #59

marco-ita opened this issue Feb 10, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@marco-ita
Copy link

Describe the bug

Followed all your instruction but still getting the following an error

The buggy code

`from TikTokApi import TikTokapi

Starts T

api = TikTokapi("/Applications/Anaconda/anaconda3/lib/python3.7/site-packages/browsermob-proxy/bin/browsermob-proxy")

The Number of trending TikToks you want to be displayed

results = 10
trending = api.trending(results)

for tiktok in trending:
# Prints the text of the tiktok
print(tiktok['itemInfos']['text'])

print(len(trending))
api.quit_browser()`

Error

`---------------------------------------------------------------------------
ProxyServerError Traceback (most recent call last)
in
2
3 # Starts T
----> 4 api = TikTokapi("/Applications/Anaconda/anaconda3/lib/python3.7/site-packages/browsermob-proxy/bin/browsermob-proxy")
5
6 # The Number of trending TikToks you want to be displayed

/Applications/Anaconda/anaconda3/lib/python3.7/site-packages/TikTokApi/tiktok.py in init(self, browsermobDirectory, headless, manualSignature)
25 path=browsermobDirectory, options=dictf)
26 # "browsermob-proxy/bin/browsermob-proxy"
---> 27 self.server.start()
28 time.sleep(1)
29 self.proxy = self.server.create_proxy()

/Applications/Anaconda/anaconda3/lib/python3.7/site-packages/browsermobproxy/server.py in start(self, options)
125 if count == retry_count:
126 self.stop()
--> 127 raise ProxyServerError("Can't connect to Browsermob-Proxy")
128
129 def stop(self):

ProxyServerError: Can't connect to Browsermob-Proxy`

Desktop (please complete the following information):

  • OS: [macOS Mojave 10.14.6]
  • Browser [chrome]
  • Version [79.0.3945.130 (Official Build) (64-bit)]

Additional context

Downloaded all the files that you recommend including browsermob (and created the right folder) and also geckodriver

Spent hours and still cant get it to work.
Thanks.

@marco-ita marco-ita added the bug Something isn't working label Feb 10, 2020
@marco-ita marco-ita changed the title [BUG] Can't connect to Browsermob-Proxy Feb 10, 2020
@davidteather
Copy link
Owner

It’s definitely an issue with your path you’re using a absolute path you might want to try relative path to your executive file if it’s not working.

Currently the api isn’t working so there’s issues behind connecting to browsermob.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants