Skip to content

Commit

Permalink
Merge pull request #254 from davidteather/nightly
Browse files Browse the repository at this point in the history
V3.4.7
  • Loading branch information
davidteather authored Sep 8, 2020
2 parents 42e9de6 + ac7419c commit a6d805a
Show file tree
Hide file tree
Showing 16 changed files with 512 additions and 167 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ dist/*
.pytest_cache/*
test.mp4
test.txt
.pytest_cache/*
.pytest_cache/*
tests/__pycache__/*
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ for tiktok in trending:
print(len(trending))
```

To run the example scripts from the repository root, make sure you use the
module form of python the interpreter

```sh
python -m examples.getTrending
```

[Here's](https://gist.github.com/davidteather/7c30780bbc30772ba11ec9e0b909e99d) an example of what a tiktok dictionary looks like.

## Detailed Documentation
Expand Down Expand Up @@ -364,4 +372,4 @@ See also the list of [contributors](https://github.com/davidteather/TikTok-Api/c

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
3 changes: 2 additions & 1 deletion TikTokApi/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from TikTokApi.tiktok import TikTokApi
from TikTokApi.tiktok import TikTokApi
#from TikTokApi.user import TikTokUser
Binary file added TikTokApi/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file added TikTokApi/__pycache__/browser.cpython-38.pyc
Binary file not shown.
Binary file added TikTokApi/__pycache__/get_acrawler.cpython-38.pyc
Binary file not shown.
Binary file added TikTokApi/__pycache__/stealth.cpython-38.pyc
Binary file not shown.
Binary file added TikTokApi/__pycache__/tiktok.cpython-38.pyc
Binary file not shown.
Binary file added TikTokApi/__pycache__/user.cpython-38.pyc
Binary file not shown.
4 changes: 3 additions & 1 deletion TikTokApi/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ async def start(self):
self.verifyFp = ''.join(random.choice(
string.ascii_lowercase + string.ascii_uppercase + string.digits) for i in range(16))

self.did = str(random.randint(10000, 999999999))

await self.page.evaluate("() => { " + get_acrawler() + " }")
self.signature = await self.page.evaluate('''() => {
var url = "''' + self.url + "&verifyFp=" + self.verifyFp + '''"
var url = "''' + self.url + "&verifyFp=" + self.verifyFp + '''&did=''' + self.did + '''"
var token = window.byted_acrawler.sign({url: url});
return token;
}''')
Expand Down
Loading

0 comments on commit a6d805a

Please sign in to comment.