| View previous topic :: View next topic |
| Author |
Message |
hayuto Voice
Joined: 28 May 2013 Posts: 14
|
Posted: Tue May 28, 2013 6:57 pm Post subject: adding view count to youtube script |
|
|
i have this script http://paste.tclhelp.net/?id=dci and i wanted to add view count to this script, i see in gdta there is <yt:statistics favoriteCount='0' viewCount='121146018'/> but my head hurts when i try to figure out regexp for this, also i dont really know tcl i just read this scripts and fix them from time to time or translate but this is huge i think it should be no brainer for anyone who knows tcl good, or if you dont want to do it maybe just tell me what to do, like do i need to convert it to utf8 like the he converts date and rating, things like that. Thanks for any help!
edit: and maybe other info too like who uploaded etc  |
|
| Back to top |
|
 |
hayuto Voice
Joined: 28 May 2013 Posts: 14
|
Posted: Thu May 30, 2013 1:55 pm Post subject: |
|
|
for youtuber name i added
| Code: |
if {[regexp -nocase {<name>(.{1,})<\/name>} $y_data - y_data_n]} {
set y_data_n [string map -nocase [list {"} {"} {&} {&} {<} {<} {>} {>}] $y_data_n]
regsub -all -nocase {[ ]{1,}} $y_data_n { } y_data_n
} else {
putlog "YouTube: parsing error (<title>, $y_api$y_vid)"
}
|
and it works |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Thu May 30, 2013 3:55 pm Post subject: |
|
|
| Quote: | <nick> https://www.youtube.com/watch?v=g7ECDwBIvhw
<bot> Waka Flocka Flame - Flockaveli (full album) 2010 | I DO NOT OWN ANY OF THIS Copyright disclaimer under Section 107 of the Copyright Act 1976: allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted b... ( by Bisharoeli | 1:07:48 | 5.00 rating | 5 comments | 1,696 views | 4w 1d 3h 24m 7s ago ) |
http://ereader.kiczek.com/youtube.tcl _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
hayuto Voice
Joined: 28 May 2013 Posts: 14
|
Posted: Fri May 31, 2013 2:31 am Post subject: |
|
|
lol i had the same script but in version 1.3, so many changes thanks |
|
| Back to top |
|
 |
neocharles Voice
Joined: 23 Apr 2013 Posts: 34
|
Posted: Fri Jul 26, 2013 8:37 am Post subject: |
|
|
Is it possible to add color to the output of the script? Maybe I'm doing it wrong, but
| Code: | | youtubeMsg privmsg $chan "\002\00301,00You\00300,04Tube\00399 [youtubeMap $n] ($rd)" |
Is resulting in
| Code: | | YouTube The Doors- Light My Fire (7:14) |
With no color anywhere.
Details:
| Quote: | [11:28:40] YouTube 1.4: Loaded..
[11:28:40] YouTube 1.4: Http: 2.8.5;BotIsPatched: 1;EncodingSystem: utf-8;Tcl: 8.6;Eggdrop: 1.6.21;Suzi: NO |
It does work with someone who has http 2.7.5, not patched, iso8859-1, and tcl 8.5 |
|
| Back to top |
|
 |
neocharles Voice
Joined: 23 Apr 2013 Posts: 34
|
Posted: Sat Jul 27, 2013 3:01 pm Post subject: |
|
|
| Fixed by downloading an update. Appears (from what I understand) to be a bug in eggdrop that thommey's patch for UTF-8 exposes in stripcodes. |
|
| Back to top |
|
 |
StormG Voice
Joined: 05 Jan 2013 Posts: 9
|
Posted: Wed May 28, 2014 3:08 am Post subject: |
|
|
| speechles wrote: | | Quote: | <nick> https://www.youtube.com/watch?v=g7ECDwBIvhw
<bot> Waka Flocka Flame - Flockaveli (full album) 2010 | I DO NOT OWN ANY OF THIS Copyright disclaimer under Section 107 of the Copyright Act 1976: allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted b... ( by Bisharoeli | 1:07:48 | 5.00 rating | 5 comments | 1,696 views | 4w 1d 3h 24m 7s ago ) |
http://ereader.kiczek.com/youtube.tcl |
Hello, is there a way for adding likes/dislikes to this script? |
|
| Back to top |
|
 |
|